@uniformdev/canvas-vue 19.41.0 → 19.42.1-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.
package/dist/index.esm.js CHANGED
@@ -295,25 +295,29 @@ var ContextualEditingComponentWrapper = defineComponent3({
295
295
  var _a;
296
296
  const { isContextualEditing } = useUniformCurrentComposition();
297
297
  const isPlaceholder = ((_a = props.component) == null ? void 0 : _a._id) === PLACEHOLDER_ID;
298
+ const component = props.component;
298
299
  return () => {
299
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
300
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
300
301
  return !(isContextualEditing == null ? void 0 : isContextualEditing.value) ? (_b = (_a2 = context.slots).default) == null ? void 0 : _b.call(_a2) : isPlaceholder && ((_d = (_c = context.slots).emptyPlaceholder) == null ? void 0 : _d.call(_c).length) === 0 ? [] : [
301
302
  h3("script", {
302
303
  "data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
303
304
  "data-parent-id": (_e = props.parentComponent) == null ? void 0 : _e._id,
304
305
  "data-parent-type": (_f = props.parentComponent) == null ? void 0 : _f.type,
305
- "data-component-id": (_g = props.component) == null ? void 0 : _g._id,
306
+ "data-component-id": component == null ? void 0 : component._id,
306
307
  "data-slot-name": props.slotName,
307
308
  "data-component-index": props.indexInSlot,
308
309
  "data-total-components": props.slotChildrenCount,
309
- "data-component-name": (_h = props.component) == null ? void 0 : _h.type,
310
+ "data-component-name": component == null ? void 0 : component.type,
310
311
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
311
- "data-is-localized": ((_j = (_i = props.component) == null ? void 0 : _i.parameters) == null ? void 0 : _j[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
312
+ "data-is-localized": ((_g = component == null ? void 0 : component.parameters) == null ? void 0 : _g[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
312
313
  // TODO: use a proper way to get the component's title, don't assume that it's always "title"
313
314
  // https://linear.app/uniform/issue/UNI-937/show-the-right-component-title-in-the-highlighter
314
- "data-component-title": (_m = (_l = (_k = props.component) == null ? void 0 : _k.parameters) == null ? void 0 : _l.title) == null ? void 0 : _m.value
315
+ "data-component-title": (_i = (_h = component == null ? void 0 : component.parameters) == null ? void 0 : _h.title) == null ? void 0 : _i.value,
316
+ // In preview mode if we are viewing a historic entry we do not want to allow
317
+ // the user to add a component to the composition or move the component around the page
318
+ "data-is-editable": ((_j = component == null ? void 0 : component._contextualEditing) == null ? void 0 : _j.isEditable) ? "true" : void 0
315
319
  }),
316
- isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_o = (_n = context.slots).default) == null ? void 0 : _o.call(_n),
320
+ isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_l = (_k = context.slots).default) == null ? void 0 : _l.call(_k),
317
321
  h3("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE })
318
322
  ];
319
323
  };
package/dist/index.js CHANGED
@@ -315,25 +315,29 @@ var ContextualEditingComponentWrapper = (0, import_vue_demi4.defineComponent)({
315
315
  var _a;
316
316
  const { isContextualEditing } = useUniformCurrentComposition();
317
317
  const isPlaceholder = ((_a = props.component) == null ? void 0 : _a._id) === import_canvas4.PLACEHOLDER_ID;
318
+ const component = props.component;
318
319
  return () => {
319
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
320
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
320
321
  return !(isContextualEditing == null ? void 0 : isContextualEditing.value) ? (_b = (_a2 = context.slots).default) == null ? void 0 : _b.call(_a2) : isPlaceholder && ((_d = (_c = context.slots).emptyPlaceholder) == null ? void 0 : _d.call(_c).length) === 0 ? [] : [
321
322
  (0, import_vue_demi4.h)("script", {
322
323
  "data-role": import_canvas4.IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
323
324
  "data-parent-id": (_e = props.parentComponent) == null ? void 0 : _e._id,
324
325
  "data-parent-type": (_f = props.parentComponent) == null ? void 0 : _f.type,
325
- "data-component-id": (_g = props.component) == null ? void 0 : _g._id,
326
+ "data-component-id": component == null ? void 0 : component._id,
326
327
  "data-slot-name": props.slotName,
327
328
  "data-component-index": props.indexInSlot,
328
329
  "data-total-components": props.slotChildrenCount,
329
- "data-component-name": (_h = props.component) == null ? void 0 : _h.type,
330
+ "data-component-name": component == null ? void 0 : component.type,
330
331
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
331
- "data-is-localized": ((_j = (_i = props.component) == null ? void 0 : _i.parameters) == null ? void 0 : _j[import_canvas4.CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
332
+ "data-is-localized": ((_g = component == null ? void 0 : component.parameters) == null ? void 0 : _g[import_canvas4.CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
332
333
  // TODO: use a proper way to get the component's title, don't assume that it's always "title"
333
334
  // https://linear.app/uniform/issue/UNI-937/show-the-right-component-title-in-the-highlighter
334
- "data-component-title": (_m = (_l = (_k = props.component) == null ? void 0 : _k.parameters) == null ? void 0 : _l.title) == null ? void 0 : _m.value
335
+ "data-component-title": (_i = (_h = component == null ? void 0 : component.parameters) == null ? void 0 : _h.title) == null ? void 0 : _i.value,
336
+ // In preview mode if we are viewing a historic entry we do not want to allow
337
+ // the user to add a component to the composition or move the component around the page
338
+ "data-is-editable": ((_j = component == null ? void 0 : component._contextualEditing) == null ? void 0 : _j.isEditable) ? "true" : void 0
335
339
  }),
336
- isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_o = (_n = context.slots).default) == null ? void 0 : _o.call(_n),
340
+ isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_l = (_k = context.slots).default) == null ? void 0 : _l.call(_k),
337
341
  (0, import_vue_demi4.h)("script", { "data-role": import_canvas4.IN_CONTEXT_EDITOR_COMPONENT_END_ROLE })
338
342
  ];
339
343
  };
package/dist/index.mjs CHANGED
@@ -295,25 +295,29 @@ var ContextualEditingComponentWrapper = defineComponent3({
295
295
  var _a;
296
296
  const { isContextualEditing } = useUniformCurrentComposition();
297
297
  const isPlaceholder = ((_a = props.component) == null ? void 0 : _a._id) === PLACEHOLDER_ID;
298
+ const component = props.component;
298
299
  return () => {
299
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
300
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
300
301
  return !(isContextualEditing == null ? void 0 : isContextualEditing.value) ? (_b = (_a2 = context.slots).default) == null ? void 0 : _b.call(_a2) : isPlaceholder && ((_d = (_c = context.slots).emptyPlaceholder) == null ? void 0 : _d.call(_c).length) === 0 ? [] : [
301
302
  h3("script", {
302
303
  "data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
303
304
  "data-parent-id": (_e = props.parentComponent) == null ? void 0 : _e._id,
304
305
  "data-parent-type": (_f = props.parentComponent) == null ? void 0 : _f.type,
305
- "data-component-id": (_g = props.component) == null ? void 0 : _g._id,
306
+ "data-component-id": component == null ? void 0 : component._id,
306
307
  "data-slot-name": props.slotName,
307
308
  "data-component-index": props.indexInSlot,
308
309
  "data-total-components": props.slotChildrenCount,
309
- "data-component-name": (_h = props.component) == null ? void 0 : _h.type,
310
+ "data-component-name": component == null ? void 0 : component.type,
310
311
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
311
- "data-is-localized": ((_j = (_i = props.component) == null ? void 0 : _i.parameters) == null ? void 0 : _j[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
312
+ "data-is-localized": ((_g = component == null ? void 0 : component.parameters) == null ? void 0 : _g[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
312
313
  // TODO: use a proper way to get the component's title, don't assume that it's always "title"
313
314
  // https://linear.app/uniform/issue/UNI-937/show-the-right-component-title-in-the-highlighter
314
- "data-component-title": (_m = (_l = (_k = props.component) == null ? void 0 : _k.parameters) == null ? void 0 : _l.title) == null ? void 0 : _m.value
315
+ "data-component-title": (_i = (_h = component == null ? void 0 : component.parameters) == null ? void 0 : _h.title) == null ? void 0 : _i.value,
316
+ // In preview mode if we are viewing a historic entry we do not want to allow
317
+ // the user to add a component to the composition or move the component around the page
318
+ "data-is-editable": ((_j = component == null ? void 0 : component._contextualEditing) == null ? void 0 : _j.isEditable) ? "true" : void 0
315
319
  }),
316
- isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_o = (_n = context.slots).default) == null ? void 0 : _o.call(_n),
320
+ isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_l = (_k = context.slots).default) == null ? void 0 : _l.call(_k),
317
321
  h3("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE })
318
322
  ];
319
323
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-vue",
3
- "version": "19.41.0",
3
+ "version": "19.42.1-alpha.6+8511a0877",
4
4
  "description": "Vue SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "document": "api-extractor run --local"
24
24
  },
25
25
  "dependencies": {
26
- "@uniformdev/canvas": "19.41.0",
27
- "@uniformdev/context-vue": "19.41.0",
28
- "@uniformdev/richtext": "19.41.0",
26
+ "@uniformdev/canvas": "19.42.1-alpha.6+8511a0877",
27
+ "@uniformdev/context-vue": "19.42.1-alpha.6+8511a0877",
28
+ "@uniformdev/richtext": "19.42.1-alpha.6+8511a0877",
29
29
  "vue-demi": "^0.14.0"
30
30
  },
31
31
  "peerDependencies": {
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "cd4f9fd5bbdcba2b7f7235dbf342418a6bbaacb9"
62
+ "gitHead": "8511a0877200b169973a40ab7c7684e6744f3d2f"
63
63
  }