@uniformdev/context-ui 18.20.0 → 18.21.1-alpha.4

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
@@ -1173,9 +1173,9 @@ var PersonalizationCriteriaStatic = ({
1173
1173
  components,
1174
1174
  errors = {}
1175
1175
  }) => {
1176
- const currentValue = value || {
1177
- crit: []
1178
- };
1176
+ var _a;
1177
+ const currentValue = { crit: [], ...value };
1178
+ currentValue.crit = (_a = currentValue.crit) != null ? _a : [];
1179
1179
  const setOp = (op) => {
1180
1180
  const finalOp = op === "&" ? void 0 : op;
1181
1181
  setValue({
@@ -1219,8 +1219,8 @@ var PersonalizationCriteriaStatic = ({
1219
1219
  ) : null,
1220
1220
  (components == null ? void 0 : components.CustomVariantName) ? /* @__PURE__ */ jsx16(components.CustomVariantName, {}) : null,
1221
1221
  !currentValue.crit.length ? /* @__PURE__ */ jsx16(Callout2, { title: "Default variant", type: "info", css: { marginBlock: "var(--spacing-base)" }, children: /* @__PURE__ */ jsx16(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__ */ jsx16("div", { children: currentValue.crit.map((currentCriteria, index) => {
1222
- var _a, _b, _c, _d;
1223
- const critHasLhs = ((_a = currentCriteria.l) == null ? void 0 : _a.length) > 0;
1222
+ var _a2, _b, _c, _d;
1223
+ const critHasLhs = ((_a2 = currentCriteria.l) == null ? void 0 : _a2.length) > 0;
1224
1224
  const critHasRhs = currentCriteria.op !== "+" && currentCriteria.op !== "-";
1225
1225
  return /* @__PURE__ */ jsxs8("div", { css: criteriaItem, "data-test-id": "criteria-container", children: [
1226
1226
  /* @__PURE__ */ jsxs8(
package/dist/index.js CHANGED
@@ -1224,9 +1224,9 @@ var PersonalizationCriteriaStatic = ({
1224
1224
  components,
1225
1225
  errors = {}
1226
1226
  }) => {
1227
- const currentValue = value || {
1228
- crit: []
1229
- };
1227
+ var _a;
1228
+ const currentValue = { crit: [], ...value };
1229
+ currentValue.crit = (_a = currentValue.crit) != null ? _a : [];
1230
1230
  const setOp = (op) => {
1231
1231
  const finalOp = op === "&" ? void 0 : op;
1232
1232
  setValue({
@@ -1270,8 +1270,8 @@ var PersonalizationCriteriaStatic = ({
1270
1270
  ) : null,
1271
1271
  (components == null ? void 0 : components.CustomVariantName) ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(components.CustomVariantName, {}) : null,
1272
1272
  !currentValue.crit.length ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_design_system9.Callout, { title: "Default variant", type: "info", css: { marginBlock: "var(--spacing-base)" }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_design_system9.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_runtime15.jsx)("div", { children: currentValue.crit.map((currentCriteria, index) => {
1273
- var _a, _b, _c, _d;
1274
- const critHasLhs = ((_a = currentCriteria.l) == null ? void 0 : _a.length) > 0;
1273
+ var _a2, _b, _c, _d;
1274
+ const critHasLhs = ((_a2 = currentCriteria.l) == null ? void 0 : _a2.length) > 0;
1275
1275
  const critHasRhs = currentCriteria.op !== "+" && currentCriteria.op !== "-";
1276
1276
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { css: criteriaItem, "data-test-id": "criteria-container", children: [
1277
1277
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
package/dist/index.mjs CHANGED
@@ -1173,9 +1173,9 @@ var PersonalizationCriteriaStatic = ({
1173
1173
  components,
1174
1174
  errors = {}
1175
1175
  }) => {
1176
- const currentValue = value || {
1177
- crit: []
1178
- };
1176
+ var _a;
1177
+ const currentValue = { crit: [], ...value };
1178
+ currentValue.crit = (_a = currentValue.crit) != null ? _a : [];
1179
1179
  const setOp = (op) => {
1180
1180
  const finalOp = op === "&" ? void 0 : op;
1181
1181
  setValue({
@@ -1219,8 +1219,8 @@ var PersonalizationCriteriaStatic = ({
1219
1219
  ) : null,
1220
1220
  (components == null ? void 0 : components.CustomVariantName) ? /* @__PURE__ */ jsx16(components.CustomVariantName, {}) : null,
1221
1221
  !currentValue.crit.length ? /* @__PURE__ */ jsx16(Callout2, { title: "Default variant", type: "info", css: { marginBlock: "var(--spacing-base)" }, children: /* @__PURE__ */ jsx16(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__ */ jsx16("div", { children: currentValue.crit.map((currentCriteria, index) => {
1222
- var _a, _b, _c, _d;
1223
- const critHasLhs = ((_a = currentCriteria.l) == null ? void 0 : _a.length) > 0;
1222
+ var _a2, _b, _c, _d;
1223
+ const critHasLhs = ((_a2 = currentCriteria.l) == null ? void 0 : _a2.length) > 0;
1224
1224
  const critHasRhs = currentCriteria.op !== "+" && currentCriteria.op !== "-";
1225
1225
  return /* @__PURE__ */ jsxs8("div", { css: criteriaItem, "data-test-id": "criteria-container", children: [
1226
1226
  /* @__PURE__ */ jsxs8(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context-ui",
3
- "version": "18.20.0",
3
+ "version": "18.21.1-alpha.4+677936e4a",
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",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@emotion/react": "11.10.5",
35
- "@uniformdev/context": "18.20.0",
36
- "@uniformdev/design-system": "18.20.0",
35
+ "@uniformdev/context": "18.21.1-alpha.4+677936e4a",
36
+ "@uniformdev/design-system": "18.21.1-alpha.4+677936e4a",
37
37
  "immer": "9.0.19",
38
38
  "react-beautiful-dnd": "13.1.1",
39
39
  "react-icons": "^4.7.1",
@@ -75,5 +75,5 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "gitHead": "a16271ccfcd23212b325176c726f52b7fe9fa890"
78
+ "gitHead": "677936e4a7af7c7c738893d83a2afa8cddbb7bbc"
79
79
  }