@uniformdev/canvas-react 20.7.1-alpha.4 → 20.8.2-alpha.15
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 +8 -4
- package/dist/index.js +5 -4
- package/dist/index.mjs +8 -4
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -148,6 +148,9 @@ import React6 from "react";
|
|
|
148
148
|
|
|
149
149
|
// src/defaultSystemComponentResolver.tsx
|
|
150
150
|
import {
|
|
151
|
+
CANVAS_PERSONALIZATION_ALGORITHM_PARAM,
|
|
152
|
+
CANVAS_PERSONALIZATION_EVENT_NAME_PARAM,
|
|
153
|
+
CANVAS_PERSONALIZATION_TAKE_PARAM,
|
|
151
154
|
mapSlotToPersonalizedVariations,
|
|
152
155
|
mapSlotToTestVariations
|
|
153
156
|
} from "@uniformdev/canvas";
|
|
@@ -171,7 +174,7 @@ var defaultSystemComponentResolver = {
|
|
|
171
174
|
);
|
|
172
175
|
},
|
|
173
176
|
personalization: (component, key, renderChild) => {
|
|
174
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
177
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
175
178
|
const pzComponent = component;
|
|
176
179
|
const processedVariants = mapSlotToPersonalizedVariations((_a = pzComponent == null ? void 0 : pzComponent.slots) == null ? void 0 : _a.pz);
|
|
177
180
|
return /* @__PURE__ */ React2.createElement(
|
|
@@ -179,9 +182,10 @@ var defaultSystemComponentResolver = {
|
|
|
179
182
|
{
|
|
180
183
|
key,
|
|
181
184
|
variations: processedVariants,
|
|
182
|
-
count: Number((_d = (_c = (_b = pzComponent.parameters) == null ? void 0 : _b
|
|
183
|
-
name: (_g = (_f = (_e = pzComponent.parameters) == null ? void 0 : _e
|
|
184
|
-
component: (variation) => renderChild(variation, 0)
|
|
185
|
+
count: Number((_d = (_c = (_b = pzComponent.parameters) == null ? void 0 : _b[CANVAS_PERSONALIZATION_TAKE_PARAM]) == null ? void 0 : _c.value) != null ? _d : 1),
|
|
186
|
+
name: (_g = (_f = (_e = pzComponent.parameters) == null ? void 0 : _e[CANVAS_PERSONALIZATION_EVENT_NAME_PARAM]) == null ? void 0 : _f.value) != null ? _g : "Untitled Personalization",
|
|
187
|
+
component: (variation) => renderChild(variation, 0),
|
|
188
|
+
algorithm: (_i = (_h = pzComponent.parameters) == null ? void 0 : _h[CANVAS_PERSONALIZATION_ALGORITHM_PARAM]) == null ? void 0 : _i.value
|
|
185
189
|
}
|
|
186
190
|
);
|
|
187
191
|
}
|
package/dist/index.js
CHANGED
|
@@ -216,7 +216,7 @@ var defaultSystemComponentResolver = {
|
|
|
216
216
|
);
|
|
217
217
|
},
|
|
218
218
|
personalization: (component, key, renderChild) => {
|
|
219
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
219
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
220
220
|
const pzComponent = component;
|
|
221
221
|
const processedVariants = (0, import_canvas2.mapSlotToPersonalizedVariations)((_a = pzComponent == null ? void 0 : pzComponent.slots) == null ? void 0 : _a.pz);
|
|
222
222
|
return /* @__PURE__ */ React2.createElement(
|
|
@@ -224,9 +224,10 @@ var defaultSystemComponentResolver = {
|
|
|
224
224
|
{
|
|
225
225
|
key,
|
|
226
226
|
variations: processedVariants,
|
|
227
|
-
count: Number((_d = (_c = (_b = pzComponent.parameters) == null ? void 0 : _b.
|
|
228
|
-
name: (_g = (_f = (_e = pzComponent.parameters) == null ? void 0 : _e.
|
|
229
|
-
component: (variation) => renderChild(variation, 0)
|
|
227
|
+
count: Number((_d = (_c = (_b = pzComponent.parameters) == null ? void 0 : _b[import_canvas2.CANVAS_PERSONALIZATION_TAKE_PARAM]) == null ? void 0 : _c.value) != null ? _d : 1),
|
|
228
|
+
name: (_g = (_f = (_e = pzComponent.parameters) == null ? void 0 : _e[import_canvas2.CANVAS_PERSONALIZATION_EVENT_NAME_PARAM]) == null ? void 0 : _f.value) != null ? _g : "Untitled Personalization",
|
|
229
|
+
component: (variation) => renderChild(variation, 0),
|
|
230
|
+
algorithm: (_i = (_h = pzComponent.parameters) == null ? void 0 : _h[import_canvas2.CANVAS_PERSONALIZATION_ALGORITHM_PARAM]) == null ? void 0 : _i.value
|
|
230
231
|
}
|
|
231
232
|
);
|
|
232
233
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -148,6 +148,9 @@ import React6 from "react";
|
|
|
148
148
|
|
|
149
149
|
// src/defaultSystemComponentResolver.tsx
|
|
150
150
|
import {
|
|
151
|
+
CANVAS_PERSONALIZATION_ALGORITHM_PARAM,
|
|
152
|
+
CANVAS_PERSONALIZATION_EVENT_NAME_PARAM,
|
|
153
|
+
CANVAS_PERSONALIZATION_TAKE_PARAM,
|
|
151
154
|
mapSlotToPersonalizedVariations,
|
|
152
155
|
mapSlotToTestVariations
|
|
153
156
|
} from "@uniformdev/canvas";
|
|
@@ -171,7 +174,7 @@ var defaultSystemComponentResolver = {
|
|
|
171
174
|
);
|
|
172
175
|
},
|
|
173
176
|
personalization: (component, key, renderChild) => {
|
|
174
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
177
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
175
178
|
const pzComponent = component;
|
|
176
179
|
const processedVariants = mapSlotToPersonalizedVariations((_a = pzComponent == null ? void 0 : pzComponent.slots) == null ? void 0 : _a.pz);
|
|
177
180
|
return /* @__PURE__ */ React2.createElement(
|
|
@@ -179,9 +182,10 @@ var defaultSystemComponentResolver = {
|
|
|
179
182
|
{
|
|
180
183
|
key,
|
|
181
184
|
variations: processedVariants,
|
|
182
|
-
count: Number((_d = (_c = (_b = pzComponent.parameters) == null ? void 0 : _b
|
|
183
|
-
name: (_g = (_f = (_e = pzComponent.parameters) == null ? void 0 : _e
|
|
184
|
-
component: (variation) => renderChild(variation, 0)
|
|
185
|
+
count: Number((_d = (_c = (_b = pzComponent.parameters) == null ? void 0 : _b[CANVAS_PERSONALIZATION_TAKE_PARAM]) == null ? void 0 : _c.value) != null ? _d : 1),
|
|
186
|
+
name: (_g = (_f = (_e = pzComponent.parameters) == null ? void 0 : _e[CANVAS_PERSONALIZATION_EVENT_NAME_PARAM]) == null ? void 0 : _f.value) != null ? _g : "Untitled Personalization",
|
|
187
|
+
component: (variation) => renderChild(variation, 0),
|
|
188
|
+
algorithm: (_i = (_h = pzComponent.parameters) == null ? void 0 : _h[CANVAS_PERSONALIZATION_ALGORITHM_PARAM]) == null ? void 0 : _i.value
|
|
185
189
|
}
|
|
186
190
|
);
|
|
187
191
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-react",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.8.2-alpha.15+b4a01d41ab",
|
|
4
4
|
"description": "React SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"document": "api-extractor run --local"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@uniformdev/canvas": "20.
|
|
49
|
-
"@uniformdev/context": "20.
|
|
50
|
-
"@uniformdev/context-react": "20.
|
|
51
|
-
"@uniformdev/richtext": "20.
|
|
48
|
+
"@uniformdev/canvas": "20.8.2-alpha.15+b4a01d41ab",
|
|
49
|
+
"@uniformdev/context": "20.8.2-alpha.15+b4a01d41ab",
|
|
50
|
+
"@uniformdev/context-react": "20.8.2-alpha.15+b4a01d41ab",
|
|
51
|
+
"@uniformdev/richtext": "20.8.2-alpha.15+b4a01d41ab"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"immer": ">= 10",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "b4a01d41abbf17cd016abbc04e9d849c56856c13"
|
|
71
71
|
}
|