@uniformdev/canvas-vue 19.40.1-alpha.16 → 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.
- package/dist/index.esm.js +10 -6
- package/dist/index.js +10 -6
- package/dist/index.mjs +10 -6
- package/package.json +5 -5
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
|
|
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":
|
|
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":
|
|
310
|
+
"data-component-name": component == null ? void 0 : component.type,
|
|
310
311
|
"data-is-placeholder": isPlaceholder ? "true" : void 0,
|
|
311
|
-
"data-is-localized": ((
|
|
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": (
|
|
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() : (
|
|
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
|
|
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":
|
|
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":
|
|
330
|
+
"data-component-name": component == null ? void 0 : component.type,
|
|
330
331
|
"data-is-placeholder": isPlaceholder ? "true" : void 0,
|
|
331
|
-
"data-is-localized": ((
|
|
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": (
|
|
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() : (
|
|
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
|
|
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":
|
|
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":
|
|
310
|
+
"data-component-name": component == null ? void 0 : component.type,
|
|
310
311
|
"data-is-placeholder": isPlaceholder ? "true" : void 0,
|
|
311
|
-
"data-is-localized": ((
|
|
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": (
|
|
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() : (
|
|
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.
|
|
3
|
+
"version": "19.42.0",
|
|
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.
|
|
27
|
-
"@uniformdev/context-vue": "19.
|
|
28
|
-
"@uniformdev/richtext": "19.
|
|
26
|
+
"@uniformdev/canvas": "19.42.0",
|
|
27
|
+
"@uniformdev/context-vue": "19.42.0",
|
|
28
|
+
"@uniformdev/richtext": "19.42.0",
|
|
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": "
|
|
62
|
+
"gitHead": "33ed87d09bfb50c8557c6bcf4eb232c76f7c99d8"
|
|
63
63
|
}
|