@uniformdev/canvas-vue 18.16.0 → 18.17.1-alpha.13
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.d.ts +9 -9
- package/dist/index.esm.js +32 -4
- package/dist/index.js +29 -4
- package/dist/index.mjs +32 -4
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as vue_demi from 'vue-demi';
|
|
2
2
|
import { PropType, ConcreteComponent, Ref } from 'vue-demi';
|
|
3
|
+
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
3
4
|
import { ComponentInstance, ComponentParameter, RootComponentInstance, UpdateCompositionMessage, SubscribeToCompositionOptions } from '@uniformdev/canvas';
|
|
4
5
|
export { createUniformApiEnhancer } from '@uniformdev/canvas';
|
|
5
|
-
import * as _uniformdev_canvas_dist_createEventBus_db3535cb from '@uniformdev/canvas/dist/createEventBus-db3535cb';
|
|
6
6
|
|
|
7
7
|
type DefaultNotImplementedComponentProps = {
|
|
8
8
|
component: ComponentInstance;
|
|
@@ -518,7 +518,7 @@ declare const useUniformCurrentComposition: () => UniformCurrentComposition;
|
|
|
518
518
|
*/
|
|
519
519
|
declare const UniformComposition: vue_demi.DefineComponent<{
|
|
520
520
|
data: {
|
|
521
|
-
type: PropType<((
|
|
521
|
+
type: PropType<((_uniformdev_canvas.ComponentInstance | {
|
|
522
522
|
type: string;
|
|
523
523
|
parameters?: {
|
|
524
524
|
[key: string]: {
|
|
@@ -672,7 +672,7 @@ declare const UniformComposition: vue_demi.DefineComponent<{
|
|
|
672
672
|
default: string;
|
|
673
673
|
};
|
|
674
674
|
contextualEditingEnhancer: {
|
|
675
|
-
type: PropType<((compositionUpdateMessage:
|
|
675
|
+
type: PropType<((compositionUpdateMessage: _uniformdev_canvas.UpdateCompositionMessage) => {
|
|
676
676
|
type: string;
|
|
677
677
|
parameters?: {
|
|
678
678
|
[key: string]: {
|
|
@@ -822,7 +822,7 @@ declare const UniformComposition: vue_demi.DefineComponent<{
|
|
|
822
822
|
[key: string]: any;
|
|
823
823
|
}>, unknown, {}, {}, vue_demi.ComponentOptionsMixin, vue_demi.ComponentOptionsMixin, {}, string, vue_demi.VNodeProps & vue_demi.AllowedComponentProps & vue_demi.ComponentCustomProps, Readonly<vue_demi.ExtractPropTypes<{
|
|
824
824
|
data: {
|
|
825
|
-
type: PropType<((
|
|
825
|
+
type: PropType<((_uniformdev_canvas.ComponentInstance | {
|
|
826
826
|
type: string;
|
|
827
827
|
parameters?: {
|
|
828
828
|
[key: string]: {
|
|
@@ -976,7 +976,7 @@ declare const UniformComposition: vue_demi.DefineComponent<{
|
|
|
976
976
|
default: string;
|
|
977
977
|
};
|
|
978
978
|
contextualEditingEnhancer: {
|
|
979
|
-
type: PropType<((compositionUpdateMessage:
|
|
979
|
+
type: PropType<((compositionUpdateMessage: _uniformdev_canvas.UpdateCompositionMessage) => {
|
|
980
980
|
type: string;
|
|
981
981
|
parameters?: {
|
|
982
982
|
[key: string]: {
|
|
@@ -1128,7 +1128,7 @@ declare const UniformComposition: vue_demi.DefineComponent<{
|
|
|
1128
1128
|
/** @deprecated use `UniformComposition` instead */
|
|
1129
1129
|
declare const Composition: vue_demi.DefineComponent<{
|
|
1130
1130
|
data: {
|
|
1131
|
-
type: PropType<((
|
|
1131
|
+
type: PropType<((_uniformdev_canvas.ComponentInstance | {
|
|
1132
1132
|
type: string;
|
|
1133
1133
|
parameters?: {
|
|
1134
1134
|
[key: string]: {
|
|
@@ -1282,7 +1282,7 @@ declare const Composition: vue_demi.DefineComponent<{
|
|
|
1282
1282
|
default: string;
|
|
1283
1283
|
};
|
|
1284
1284
|
contextualEditingEnhancer: {
|
|
1285
|
-
type: PropType<((compositionUpdateMessage:
|
|
1285
|
+
type: PropType<((compositionUpdateMessage: _uniformdev_canvas.UpdateCompositionMessage) => {
|
|
1286
1286
|
type: string;
|
|
1287
1287
|
parameters?: {
|
|
1288
1288
|
[key: string]: {
|
|
@@ -1432,7 +1432,7 @@ declare const Composition: vue_demi.DefineComponent<{
|
|
|
1432
1432
|
[key: string]: any;
|
|
1433
1433
|
}>, unknown, {}, {}, vue_demi.ComponentOptionsMixin, vue_demi.ComponentOptionsMixin, {}, string, vue_demi.VNodeProps & vue_demi.AllowedComponentProps & vue_demi.ComponentCustomProps, Readonly<vue_demi.ExtractPropTypes<{
|
|
1434
1434
|
data: {
|
|
1435
|
-
type: PropType<((
|
|
1435
|
+
type: PropType<((_uniformdev_canvas.ComponentInstance | {
|
|
1436
1436
|
type: string;
|
|
1437
1437
|
parameters?: {
|
|
1438
1438
|
[key: string]: {
|
|
@@ -1586,7 +1586,7 @@ declare const Composition: vue_demi.DefineComponent<{
|
|
|
1586
1586
|
default: string;
|
|
1587
1587
|
};
|
|
1588
1588
|
contextualEditingEnhancer: {
|
|
1589
|
-
type: PropType<((compositionUpdateMessage:
|
|
1589
|
+
type: PropType<((compositionUpdateMessage: _uniformdev_canvas.UpdateCompositionMessage) => {
|
|
1590
1590
|
type: string;
|
|
1591
1591
|
parameters?: {
|
|
1592
1592
|
[key: string]: {
|
package/dist/index.esm.js
CHANGED
|
@@ -307,7 +307,10 @@ var Composition = UniformComposition;
|
|
|
307
307
|
|
|
308
308
|
// src/components/UniformSlot.ts
|
|
309
309
|
import {
|
|
310
|
+
CANVAS_LOCALE_TAG_PARAM,
|
|
311
|
+
CANVAS_PERSONALIZE_SLOT,
|
|
310
312
|
CANVAS_PERSONALIZE_TYPE,
|
|
313
|
+
CANVAS_TEST_SLOT,
|
|
311
314
|
CANVAS_TEST_TYPE,
|
|
312
315
|
IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
|
|
313
316
|
mapSlotToPersonalizedVariations,
|
|
@@ -413,17 +416,41 @@ function renderComponent({
|
|
|
413
416
|
slotChildrenCount,
|
|
414
417
|
emptyPlaceholder
|
|
415
418
|
}) {
|
|
416
|
-
var _a, _b;
|
|
419
|
+
var _a, _b, _c;
|
|
417
420
|
if (component.type === CANVAS_TEST_TYPE) {
|
|
418
421
|
return renderTestComponent(
|
|
419
422
|
component,
|
|
420
|
-
(
|
|
423
|
+
(variantComponent) => {
|
|
424
|
+
var _a2, _b2;
|
|
425
|
+
return renderComponent({
|
|
426
|
+
component: variantComponent,
|
|
427
|
+
resolveRenderer,
|
|
428
|
+
parentComponent: component,
|
|
429
|
+
slotName: CANVAS_TEST_SLOT,
|
|
430
|
+
slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[CANVAS_TEST_SLOT].length,
|
|
431
|
+
indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[CANVAS_TEST_SLOT].findIndex(
|
|
432
|
+
({ _id }) => variantComponent._id === _id
|
|
433
|
+
)
|
|
434
|
+
});
|
|
435
|
+
}
|
|
421
436
|
);
|
|
422
437
|
}
|
|
423
438
|
if (component.type === CANVAS_PERSONALIZE_TYPE) {
|
|
424
439
|
return renderPersonalizeComponent(
|
|
425
440
|
component,
|
|
426
|
-
(
|
|
441
|
+
(variantComponent) => {
|
|
442
|
+
var _a2, _b2;
|
|
443
|
+
return renderComponent({
|
|
444
|
+
component: variantComponent,
|
|
445
|
+
resolveRenderer,
|
|
446
|
+
parentComponent: component,
|
|
447
|
+
slotName: CANVAS_PERSONALIZE_SLOT,
|
|
448
|
+
slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[CANVAS_PERSONALIZE_SLOT].length,
|
|
449
|
+
indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[CANVAS_PERSONALIZE_SLOT].findIndex(
|
|
450
|
+
({ _id }) => variantComponent._id === _id
|
|
451
|
+
)
|
|
452
|
+
});
|
|
453
|
+
}
|
|
427
454
|
);
|
|
428
455
|
}
|
|
429
456
|
const resolvedComponent = resolveRenderer == null ? void 0 : resolveRenderer(component);
|
|
@@ -442,7 +469,8 @@ function renderComponent({
|
|
|
442
469
|
"data-total-components": slotChildrenCount,
|
|
443
470
|
"data-component-name": component.type,
|
|
444
471
|
"data-is-placeholder": isPlaceholder ? "true" : void 0,
|
|
445
|
-
"data-
|
|
472
|
+
"data-is-localized": ((_a = component.parameters) == null ? void 0 : _a[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
|
|
473
|
+
"data-component-title": (_c = (_b = component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value
|
|
446
474
|
}),
|
|
447
475
|
isPlaceholder && emptyPlaceholder !== void 0 ? emptyPlaceholder() : h4(resolvedComponent, props),
|
|
448
476
|
h4("script", { "data-role": "component-end" })
|
package/dist/index.js
CHANGED
|
@@ -425,17 +425,41 @@ function renderComponent({
|
|
|
425
425
|
slotChildrenCount,
|
|
426
426
|
emptyPlaceholder
|
|
427
427
|
}) {
|
|
428
|
-
var _a, _b;
|
|
428
|
+
var _a, _b, _c;
|
|
429
429
|
if (component.type === import_canvas4.CANVAS_TEST_TYPE) {
|
|
430
430
|
return renderTestComponent(
|
|
431
431
|
component,
|
|
432
|
-
(
|
|
432
|
+
(variantComponent) => {
|
|
433
|
+
var _a2, _b2;
|
|
434
|
+
return renderComponent({
|
|
435
|
+
component: variantComponent,
|
|
436
|
+
resolveRenderer,
|
|
437
|
+
parentComponent: component,
|
|
438
|
+
slotName: import_canvas4.CANVAS_TEST_SLOT,
|
|
439
|
+
slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[import_canvas4.CANVAS_TEST_SLOT].length,
|
|
440
|
+
indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[import_canvas4.CANVAS_TEST_SLOT].findIndex(
|
|
441
|
+
({ _id }) => variantComponent._id === _id
|
|
442
|
+
)
|
|
443
|
+
});
|
|
444
|
+
}
|
|
433
445
|
);
|
|
434
446
|
}
|
|
435
447
|
if (component.type === import_canvas4.CANVAS_PERSONALIZE_TYPE) {
|
|
436
448
|
return renderPersonalizeComponent(
|
|
437
449
|
component,
|
|
438
|
-
(
|
|
450
|
+
(variantComponent) => {
|
|
451
|
+
var _a2, _b2;
|
|
452
|
+
return renderComponent({
|
|
453
|
+
component: variantComponent,
|
|
454
|
+
resolveRenderer,
|
|
455
|
+
parentComponent: component,
|
|
456
|
+
slotName: import_canvas4.CANVAS_PERSONALIZE_SLOT,
|
|
457
|
+
slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[import_canvas4.CANVAS_PERSONALIZE_SLOT].length,
|
|
458
|
+
indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[import_canvas4.CANVAS_PERSONALIZE_SLOT].findIndex(
|
|
459
|
+
({ _id }) => variantComponent._id === _id
|
|
460
|
+
)
|
|
461
|
+
});
|
|
462
|
+
}
|
|
439
463
|
);
|
|
440
464
|
}
|
|
441
465
|
const resolvedComponent = resolveRenderer == null ? void 0 : resolveRenderer(component);
|
|
@@ -454,7 +478,8 @@ function renderComponent({
|
|
|
454
478
|
"data-total-components": slotChildrenCount,
|
|
455
479
|
"data-component-name": component.type,
|
|
456
480
|
"data-is-placeholder": isPlaceholder ? "true" : void 0,
|
|
457
|
-
"data-
|
|
481
|
+
"data-is-localized": ((_a = component.parameters) == null ? void 0 : _a[import_canvas4.CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
|
|
482
|
+
"data-component-title": (_c = (_b = component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value
|
|
458
483
|
}),
|
|
459
484
|
isPlaceholder && emptyPlaceholder !== void 0 ? emptyPlaceholder() : (0, import_vue_demi5.h)(resolvedComponent, props),
|
|
460
485
|
(0, import_vue_demi5.h)("script", { "data-role": "component-end" })
|
package/dist/index.mjs
CHANGED
|
@@ -307,7 +307,10 @@ var Composition = UniformComposition;
|
|
|
307
307
|
|
|
308
308
|
// src/components/UniformSlot.ts
|
|
309
309
|
import {
|
|
310
|
+
CANVAS_LOCALE_TAG_PARAM,
|
|
311
|
+
CANVAS_PERSONALIZE_SLOT,
|
|
310
312
|
CANVAS_PERSONALIZE_TYPE,
|
|
313
|
+
CANVAS_TEST_SLOT,
|
|
311
314
|
CANVAS_TEST_TYPE,
|
|
312
315
|
IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
|
|
313
316
|
mapSlotToPersonalizedVariations,
|
|
@@ -413,17 +416,41 @@ function renderComponent({
|
|
|
413
416
|
slotChildrenCount,
|
|
414
417
|
emptyPlaceholder
|
|
415
418
|
}) {
|
|
416
|
-
var _a, _b;
|
|
419
|
+
var _a, _b, _c;
|
|
417
420
|
if (component.type === CANVAS_TEST_TYPE) {
|
|
418
421
|
return renderTestComponent(
|
|
419
422
|
component,
|
|
420
|
-
(
|
|
423
|
+
(variantComponent) => {
|
|
424
|
+
var _a2, _b2;
|
|
425
|
+
return renderComponent({
|
|
426
|
+
component: variantComponent,
|
|
427
|
+
resolveRenderer,
|
|
428
|
+
parentComponent: component,
|
|
429
|
+
slotName: CANVAS_TEST_SLOT,
|
|
430
|
+
slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[CANVAS_TEST_SLOT].length,
|
|
431
|
+
indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[CANVAS_TEST_SLOT].findIndex(
|
|
432
|
+
({ _id }) => variantComponent._id === _id
|
|
433
|
+
)
|
|
434
|
+
});
|
|
435
|
+
}
|
|
421
436
|
);
|
|
422
437
|
}
|
|
423
438
|
if (component.type === CANVAS_PERSONALIZE_TYPE) {
|
|
424
439
|
return renderPersonalizeComponent(
|
|
425
440
|
component,
|
|
426
|
-
(
|
|
441
|
+
(variantComponent) => {
|
|
442
|
+
var _a2, _b2;
|
|
443
|
+
return renderComponent({
|
|
444
|
+
component: variantComponent,
|
|
445
|
+
resolveRenderer,
|
|
446
|
+
parentComponent: component,
|
|
447
|
+
slotName: CANVAS_PERSONALIZE_SLOT,
|
|
448
|
+
slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[CANVAS_PERSONALIZE_SLOT].length,
|
|
449
|
+
indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[CANVAS_PERSONALIZE_SLOT].findIndex(
|
|
450
|
+
({ _id }) => variantComponent._id === _id
|
|
451
|
+
)
|
|
452
|
+
});
|
|
453
|
+
}
|
|
427
454
|
);
|
|
428
455
|
}
|
|
429
456
|
const resolvedComponent = resolveRenderer == null ? void 0 : resolveRenderer(component);
|
|
@@ -442,7 +469,8 @@ function renderComponent({
|
|
|
442
469
|
"data-total-components": slotChildrenCount,
|
|
443
470
|
"data-component-name": component.type,
|
|
444
471
|
"data-is-placeholder": isPlaceholder ? "true" : void 0,
|
|
445
|
-
"data-
|
|
472
|
+
"data-is-localized": ((_a = component.parameters) == null ? void 0 : _a[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
|
|
473
|
+
"data-component-title": (_c = (_b = component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value
|
|
446
474
|
}),
|
|
447
475
|
isPlaceholder && emptyPlaceholder !== void 0 ? emptyPlaceholder() : h4(resolvedComponent, props),
|
|
448
476
|
h4("script", { "data-role": "component-end" })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-vue",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.17.1-alpha.13+77f2eaabc",
|
|
4
4
|
"description": "Vue SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\""
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@uniformdev/canvas": "18.
|
|
25
|
+
"@uniformdev/canvas": "18.17.1-alpha.13+77f2eaabc",
|
|
26
26
|
"@vue/test-utils": "2.2.10",
|
|
27
27
|
"vue-demi": "^0.13.11"
|
|
28
28
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@testing-library/vue": "6.6.1",
|
|
41
41
|
"@types/uuid": "9.0.0",
|
|
42
|
-
"@uniformdev/context-vue": "18.
|
|
42
|
+
"@uniformdev/context-vue": "18.17.1-alpha.13+77f2eaabc",
|
|
43
43
|
"@vue/server-test-utils": "1.3.0",
|
|
44
44
|
"vue": "3.2.45",
|
|
45
45
|
"vue-server-renderer": "2.7.14",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"last 2 versions",
|
|
63
63
|
"not dead"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "77f2eaabc380a8251c040f8bdd21d5451351022f"
|
|
66
66
|
}
|