@prismicio/types-internal 3.2.0-alpha.4 → 3.2.0-alpha.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.
@@ -129,7 +129,6 @@ function traverseGroupItemsContent({ path, model, content, }) {
129
129
  { key: index.toString(), type: "GroupItem" },
130
130
  ]);
131
131
  const groupItemFields = groupItem.value.reduce((acc, [fieldKey, fieldContent]) => {
132
- var _a;
133
132
  const fieldDef = model === null || model === void 0 ? void 0 : model[fieldKey];
134
133
  let transformedField;
135
134
  if ((!fieldDef || (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === customtypes_1.GroupFieldType) &&
@@ -142,8 +141,7 @@ function traverseGroupItemsContent({ path, model, content, }) {
142
141
  content: fieldContent,
143
142
  })(transform);
144
143
  }
145
- else if ((!fieldDef ||
146
- ((fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === "Link" && ((_a = fieldDef.config) === null || _a === void 0 ? void 0 : _a.repeat))) &&
144
+ else if ((!fieldDef || (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === "Link") &&
147
145
  fieldContent.__TYPE__ === "RepeatableContent") {
148
146
  transformedField = (0, nestable_1.traverseRepeatableContent)({
149
147
  path: groupItemPath.concat([{ key: fieldKey, type: "Widget" }]),
@@ -120,7 +120,6 @@ function traverseSharedSliceContent({ path, sliceKey, sliceName, model, content,
120
120
  var _a, _b;
121
121
  const fieldDef = (_b = (_a = model === null || model === void 0 ? void 0 : model.fields) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b[fieldKey];
122
122
  const transformedField = (() => {
123
- var _a;
124
123
  if ((0, GroupContent_1.isGroupContent)(fieldContent)) {
125
124
  return (0, GroupContent_1.traverseGroupContent)({
126
125
  path: path.concat([
@@ -142,9 +141,7 @@ function traverseSharedSliceContent({ path, sliceKey, sliceName, model, content,
142
141
  key: fieldKey,
143
142
  apiId: fieldKey,
144
143
  content: fieldContent,
145
- model: (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === "Link" && ((_a = fieldDef.config) === null || _a === void 0 ? void 0 : _a.repeat)
146
- ? fieldDef
147
- : undefined,
144
+ model: (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === "Link" ? fieldDef : undefined,
148
145
  })(transformWidget);
149
146
  }
150
147
  else if ((0, nestable_1.isNestableContent)(fieldContent)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/types-internal",
3
- "version": "3.2.0-alpha.4",
3
+ "version": "3.2.0-alpha.6",
4
4
  "description": "Prismic types for Custom Types and Prismic Data",
5
5
  "keywords": [
6
6
  "typescript",
@@ -77,5 +77,6 @@
77
77
  },
78
78
  "publishConfig": {
79
79
  "access": "public"
80
- }
80
+ },
81
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
81
82
  }
@@ -241,8 +241,7 @@ export function traverseGroupItemsContent({
241
241
  content: fieldContent,
242
242
  })(transform)
243
243
  } else if (
244
- (!fieldDef ||
245
- (fieldDef?.type === "Link" && fieldDef.config?.repeat)) &&
244
+ (!fieldDef || fieldDef?.type === "Link") &&
246
245
  fieldContent.__TYPE__ === "RepeatableContent"
247
246
  ) {
248
247
  transformedField = traverseRepeatableContent({
@@ -228,10 +228,7 @@ export function traverseSharedSliceContent({
228
228
  key: fieldKey,
229
229
  apiId: fieldKey,
230
230
  content: fieldContent,
231
- model:
232
- fieldDef?.type === "Link" && fieldDef.config?.repeat
233
- ? fieldDef
234
- : undefined,
231
+ model: fieldDef?.type === "Link" ? fieldDef : undefined,
235
232
  })(transformWidget)
236
233
  } else if (isNestableContent(fieldContent)) {
237
234
  return transformWidget({