@uniformdev/context-ui 19.132.0 → 19.134.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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +8 -3
- package/dist/index.js +8 -3
- package/dist/index.mjs +8 -3
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -127,6 +127,7 @@ interface PersonalizationCriteriaStaticProps {
|
|
|
127
127
|
NoDimensionsDefined?: React.ComponentType;
|
|
128
128
|
Title?: React.ComponentType;
|
|
129
129
|
CustomVariantName?: React.ComponentType;
|
|
130
|
+
ControlPercentage?: React.ComponentType;
|
|
130
131
|
};
|
|
131
132
|
errors?: {
|
|
132
133
|
lhs?: Array<string | undefined>;
|
package/dist/index.d.ts
CHANGED
|
@@ -127,6 +127,7 @@ interface PersonalizationCriteriaStaticProps {
|
|
|
127
127
|
NoDimensionsDefined?: React.ComponentType;
|
|
128
128
|
Title?: React.ComponentType;
|
|
129
129
|
CustomVariantName?: React.ComponentType;
|
|
130
|
+
ControlPercentage?: React.ComponentType;
|
|
130
131
|
};
|
|
131
132
|
errors?: {
|
|
132
133
|
lhs?: Array<string | undefined>;
|
package/dist/index.esm.js
CHANGED
|
@@ -283,12 +283,16 @@ var contextCriteriaMenuOperators = [
|
|
|
283
283
|
value: "<="
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
|
-
name: "has
|
|
286
|
+
name: "has strongest score across all categories",
|
|
287
287
|
value: "+"
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
name: "has the weakest score",
|
|
291
291
|
value: "-"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "has strongest category score",
|
|
295
|
+
value: "^"
|
|
292
296
|
}
|
|
293
297
|
];
|
|
294
298
|
function CriteriaOperatorMenu({ onChange, value, ...props }) {
|
|
@@ -1264,7 +1268,7 @@ function isPersonalizationCriteriaData(obj) {
|
|
|
1264
1268
|
return obj.crit !== void 0;
|
|
1265
1269
|
}
|
|
1266
1270
|
function opHasRhs(op) {
|
|
1267
|
-
return op !== "+" && op !== "-";
|
|
1271
|
+
return op !== "+" && op !== "-" && op !== "^";
|
|
1268
1272
|
}
|
|
1269
1273
|
|
|
1270
1274
|
// src/components/PersonalizationCriteria/PersonalizationCriteriaStatic.tsx
|
|
@@ -1390,10 +1394,11 @@ var PersonalizationCriteriaStatic = ({
|
|
|
1390
1394
|
}
|
|
1391
1395
|
) : null,
|
|
1392
1396
|
(components == null ? void 0 : components.CustomVariantName) ? /* @__PURE__ */ jsx17(components.CustomVariantName, {}) : null,
|
|
1397
|
+
(components == null ? void 0 : components.ControlPercentage) ? /* @__PURE__ */ jsx17(components.ControlPercentage, {}) : null,
|
|
1393
1398
|
!currentValue.crit.length ? /* @__PURE__ */ jsx17(Callout3, { title: "Default variant", type: "info", css: { marginBlock: "var(--spacing-base)" }, children: /* @__PURE__ */ jsx17(Paragraph, { children: 'This personalized variant has no match criteria and will be shown to any visitor that does not match any preceding variants. Ensure that default variants come last in the variant list. Personalize this variant by clicking "Add Criteria" to get started.' }) }) : /* @__PURE__ */ jsx17("div", { children: currentValue.crit.map((currentCriteria, index) => {
|
|
1394
1399
|
var _a2, _b, _c, _d;
|
|
1395
1400
|
const critHasLhs = ((_a2 = currentCriteria.l) == null ? void 0 : _a2.length) > 0;
|
|
1396
|
-
const critHasRhs = currentCriteria.op
|
|
1401
|
+
const critHasRhs = opHasRhs(currentCriteria.op);
|
|
1397
1402
|
return /* @__PURE__ */ jsxs9("div", { css: criteriaItem, "data-testid": "criteria-container", children: [
|
|
1398
1403
|
/* @__PURE__ */ jsxs9(
|
|
1399
1404
|
"div",
|
package/dist/index.js
CHANGED
|
@@ -335,12 +335,16 @@ var contextCriteriaMenuOperators = [
|
|
|
335
335
|
value: "<="
|
|
336
336
|
},
|
|
337
337
|
{
|
|
338
|
-
name: "has
|
|
338
|
+
name: "has strongest score across all categories",
|
|
339
339
|
value: "+"
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
342
|
name: "has the weakest score",
|
|
343
343
|
value: "-"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: "has strongest category score",
|
|
347
|
+
value: "^"
|
|
344
348
|
}
|
|
345
349
|
];
|
|
346
350
|
function CriteriaOperatorMenu({ onChange, value, ...props }) {
|
|
@@ -1308,7 +1312,7 @@ function isPersonalizationCriteriaData(obj) {
|
|
|
1308
1312
|
return obj.crit !== void 0;
|
|
1309
1313
|
}
|
|
1310
1314
|
function opHasRhs(op) {
|
|
1311
|
-
return op !== "+" && op !== "-";
|
|
1315
|
+
return op !== "+" && op !== "-" && op !== "^";
|
|
1312
1316
|
}
|
|
1313
1317
|
|
|
1314
1318
|
// src/components/PersonalizationCriteria/PersonalizationCriteriaStatic.tsx
|
|
@@ -1434,10 +1438,11 @@ var PersonalizationCriteriaStatic = ({
|
|
|
1434
1438
|
}
|
|
1435
1439
|
) : null,
|
|
1436
1440
|
(components == null ? void 0 : components.CustomVariantName) ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(components.CustomVariantName, {}) : null,
|
|
1441
|
+
(components == null ? void 0 : components.ControlPercentage) ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(components.ControlPercentage, {}) : null,
|
|
1437
1442
|
!currentValue.crit.length ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_design_system10.Callout, { title: "Default variant", type: "info", css: { marginBlock: "var(--spacing-base)" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_design_system10.Paragraph, { children: 'This personalized variant has no match criteria and will be shown to any visitor that does not match any preceding variants. Ensure that default variants come last in the variant list. Personalize this variant by clicking "Add Criteria" to get started.' }) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: currentValue.crit.map((currentCriteria, index) => {
|
|
1438
1443
|
var _a2, _b, _c, _d;
|
|
1439
1444
|
const critHasLhs = ((_a2 = currentCriteria.l) == null ? void 0 : _a2.length) > 0;
|
|
1440
|
-
const critHasRhs = currentCriteria.op
|
|
1445
|
+
const critHasRhs = opHasRhs(currentCriteria.op);
|
|
1441
1446
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { css: criteriaItem, "data-testid": "criteria-container", children: [
|
|
1442
1447
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1443
1448
|
"div",
|
package/dist/index.mjs
CHANGED
|
@@ -283,12 +283,16 @@ var contextCriteriaMenuOperators = [
|
|
|
283
283
|
value: "<="
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
|
-
name: "has
|
|
286
|
+
name: "has strongest score across all categories",
|
|
287
287
|
value: "+"
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
name: "has the weakest score",
|
|
291
291
|
value: "-"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "has strongest category score",
|
|
295
|
+
value: "^"
|
|
292
296
|
}
|
|
293
297
|
];
|
|
294
298
|
function CriteriaOperatorMenu({ onChange, value, ...props }) {
|
|
@@ -1264,7 +1268,7 @@ function isPersonalizationCriteriaData(obj) {
|
|
|
1264
1268
|
return obj.crit !== void 0;
|
|
1265
1269
|
}
|
|
1266
1270
|
function opHasRhs(op) {
|
|
1267
|
-
return op !== "+" && op !== "-";
|
|
1271
|
+
return op !== "+" && op !== "-" && op !== "^";
|
|
1268
1272
|
}
|
|
1269
1273
|
|
|
1270
1274
|
// src/components/PersonalizationCriteria/PersonalizationCriteriaStatic.tsx
|
|
@@ -1390,10 +1394,11 @@ var PersonalizationCriteriaStatic = ({
|
|
|
1390
1394
|
}
|
|
1391
1395
|
) : null,
|
|
1392
1396
|
(components == null ? void 0 : components.CustomVariantName) ? /* @__PURE__ */ jsx17(components.CustomVariantName, {}) : null,
|
|
1397
|
+
(components == null ? void 0 : components.ControlPercentage) ? /* @__PURE__ */ jsx17(components.ControlPercentage, {}) : null,
|
|
1393
1398
|
!currentValue.crit.length ? /* @__PURE__ */ jsx17(Callout3, { title: "Default variant", type: "info", css: { marginBlock: "var(--spacing-base)" }, children: /* @__PURE__ */ jsx17(Paragraph, { children: 'This personalized variant has no match criteria and will be shown to any visitor that does not match any preceding variants. Ensure that default variants come last in the variant list. Personalize this variant by clicking "Add Criteria" to get started.' }) }) : /* @__PURE__ */ jsx17("div", { children: currentValue.crit.map((currentCriteria, index) => {
|
|
1394
1399
|
var _a2, _b, _c, _d;
|
|
1395
1400
|
const critHasLhs = ((_a2 = currentCriteria.l) == null ? void 0 : _a2.length) > 0;
|
|
1396
|
-
const critHasRhs = currentCriteria.op
|
|
1401
|
+
const critHasRhs = opHasRhs(currentCriteria.op);
|
|
1397
1402
|
return /* @__PURE__ */ jsxs9("div", { css: criteriaItem, "data-testid": "criteria-container", children: [
|
|
1398
1403
|
/* @__PURE__ */ jsxs9(
|
|
1399
1404
|
"div",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/context-ui",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.134.0",
|
|
4
4
|
"description": "React-based functionality and components for Uniform Context",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@emotion/react": "11.11.3",
|
|
36
36
|
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v4.10.1/react-icons-all-files-4.10.1.tgz",
|
|
37
|
-
"@uniformdev/context": "19.
|
|
38
|
-
"@uniformdev/design-system": "19.
|
|
37
|
+
"@uniformdev/context": "19.134.0",
|
|
38
|
+
"@uniformdev/design-system": "19.134.0",
|
|
39
39
|
"immer": "10.0.3",
|
|
40
40
|
"react-beautiful-dnd": "13.1.1",
|
|
41
41
|
"react-select": "5.8.0",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "4d3856ce53d66b4e69fd693dadc98292cfbc37d1"
|
|
77
77
|
}
|