@uniformdev/canvas-next-rsc 19.41.0 → 19.42.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.
@@ -4,7 +4,7 @@ import { componentStoreResolver } from '../register/componentStoreResolver';
4
4
  import { convertComponentToProps } from './convertComponentToProps';
5
5
  import { UniformComponent } from './UniformComponent';
6
6
  export function renderComponent({ component, context, resolveSystem, key = 0, indexInSlot, slotName, parentComponent, slotChildrenCount, emptyPlaceholder, }) {
7
- var _a, _b, _c, _d;
7
+ var _a, _b, _c, _d, _e;
8
8
  const RenderComponent = componentStoreResolver(component);
9
9
  // custom handling for tests and personalizes
10
10
  if (component.type === CANVAS_TEST_TYPE) {
@@ -44,7 +44,10 @@ export function renderComponent({ component, context, resolveSystem, key = 0, in
44
44
  });
45
45
  const shouldRenderContextualEditingTags = Boolean(component._id);
46
46
  const isPlaceholder = component._id === PLACEHOLDER_ID;
47
- return (_jsx(UniformComponent, { data: component, context: context, children: _jsxs(_Fragment, { children: [!shouldRenderContextualEditingTags ? null : (_jsx("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, "data-parent-id": parentComponent === null || parentComponent === void 0 ? void 0 : parentComponent._id, "data-parent-type": parentComponent === null || parentComponent === void 0 ? void 0 : parentComponent.type, "data-component-id": component._id, "data-slot-name": slotName !== null && slotName !== void 0 ? slotName : '', "data-component-index": indexInSlot !== null && indexInSlot !== void 0 ? indexInSlot : '', "data-total-components": slotChildrenCount !== null && slotChildrenCount !== void 0 ? slotChildrenCount : '', "data-component-name": component.type, "data-is-placeholder": isPlaceholder ? 'true' : undefined, "data-is-localized": ((_a = component.parameters) === null || _a === void 0 ? void 0 : _a[CANVAS_LOCALE_TAG_PARAM]) ? 'true' : undefined, "data-component-title": (_d = (_c = (_b = component.parameters) === null || _b === void 0 ? void 0 : _b.title) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : '' }, key)), isPlaceholder && emptyPlaceholder !== undefined ? (emptyPlaceholder) : (_jsx(RenderComponent, { ...props })), !shouldRenderContextualEditingTags ? null : _jsx("script", { "data-role": "component-end" })] }) }, key));
47
+ const isEditable = ((_a = component === null || component === void 0 ? void 0 : component._contextualEditing) === null || _a === void 0 ? void 0 : _a.isEditable)
48
+ ? 'true'
49
+ : undefined;
50
+ return (_jsx(UniformComponent, { data: component, context: context, children: _jsxs(_Fragment, { children: [!shouldRenderContextualEditingTags ? null : (_jsx("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, "data-parent-id": parentComponent === null || parentComponent === void 0 ? void 0 : parentComponent._id, "data-parent-type": parentComponent === null || parentComponent === void 0 ? void 0 : parentComponent.type, "data-component-id": component._id, "data-slot-name": slotName !== null && slotName !== void 0 ? slotName : '', "data-component-index": indexInSlot !== null && indexInSlot !== void 0 ? indexInSlot : '', "data-total-components": slotChildrenCount !== null && slotChildrenCount !== void 0 ? slotChildrenCount : '', "data-component-name": component.type, "data-is-placeholder": isPlaceholder ? 'true' : undefined, "data-is-localized": ((_b = component.parameters) === null || _b === void 0 ? void 0 : _b[CANVAS_LOCALE_TAG_PARAM]) ? 'true' : undefined, "data-component-title": (_e = (_d = (_c = component.parameters) === null || _c === void 0 ? void 0 : _c.title) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : '', "data-is-editable": isEditable }, key)), isPlaceholder && emptyPlaceholder !== undefined ? (emptyPlaceholder) : (_jsx(RenderComponent, { ...props })), !shouldRenderContextualEditingTags ? null : _jsx("script", { "data-role": "component-end" })] }) }, key));
48
51
  }
49
52
  return null;
50
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next-rsc",
3
- "version": "19.41.0",
3
+ "version": "19.42.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "dev": "pnpm build --watch",
@@ -56,13 +56,13 @@
56
56
  "typescript": "^5.0.4"
57
57
  },
58
58
  "dependencies": {
59
- "@uniformdev/canvas": "19.41.0",
60
- "@uniformdev/canvas-react": "19.41.0",
61
- "@uniformdev/context": "19.41.0",
62
- "@uniformdev/project-map": "19.41.0",
63
- "@uniformdev/redirect": "19.41.0",
64
- "@uniformdev/richtext": "19.41.0",
65
- "@uniformdev/webhooks": "19.41.0",
59
+ "@uniformdev/canvas": "19.42.0",
60
+ "@uniformdev/canvas-react": "19.42.0",
61
+ "@uniformdev/context": "19.42.0",
62
+ "@uniformdev/project-map": "19.42.0",
63
+ "@uniformdev/redirect": "19.42.0",
64
+ "@uniformdev/richtext": "19.42.0",
65
+ "@uniformdev/webhooks": "19.42.0",
66
66
  "@vercel/edge-config": "^0.2.0",
67
67
  "dequal": "^2.0.3",
68
68
  "js-cookie": "^3.0.5",
@@ -76,5 +76,5 @@
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "gitHead": "cd4f9fd5bbdcba2b7f7235dbf342418a6bbaacb9"
79
+ "gitHead": "33ed87d09bfb50c8557c6bcf4eb232c76f7c99d8"
80
80
  }