@yext/visual-editor 1.0.0-beta.1 → 1.0.0-beta.2

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.
@@ -38456,15 +38456,15 @@ const iHe = ({
38456
38456
  var g, y, k, S, C, $, w, L;
38457
38457
  const f = c.title ? be(
38458
38458
  c.title,
38459
- t.locale || "en",
38459
+ (t == null ? void 0 : t.locale) || "en",
38460
38460
  t
38461
38461
  ) : "", p = c.description ? be(
38462
38462
  c.description,
38463
- t.locale || "en",
38463
+ (t == null ? void 0 : t.locale) || "en",
38464
38464
  t
38465
38465
  ) : "", h = c.dateTime ? be(
38466
38466
  c.dateTime,
38467
- t.locale || "en",
38467
+ (t == null ? void 0 : t.locale) || "en",
38468
38468
  t
38469
38469
  ) : "", m = `${e.id}-Card-${u}`;
38470
38470
  return {
@@ -38939,7 +38939,7 @@ const iHe = ({
38939
38939
  e.data.promo.constantValue = {}, e.data.promo.constantValueEnabled = !e.data.promo.constantValueOverride.title || !e.data.promo.constantValueOverride.description || !e.data.promo.constantValueOverride.image || !e.data.promo.constantValueOverride.cta, delete e.styles.heading, delete e.data.promo.constantValueOverride, delete e.styles.imageStyle, delete e.styles.heading, delete e.styles.ctaVariant;
38940
38940
  const f = a != null && a.title ? be(
38941
38941
  a.title,
38942
- t.locale ?? "en",
38942
+ (t == null ? void 0 : t.locale) || "en",
38943
38943
  t
38944
38944
  ) : "";
38945
38945
  return {
@@ -39242,11 +39242,11 @@ const iHe = ({
39242
39242
  var f, p, h;
39243
39243
  const l = s.name ? be(
39244
39244
  s.name,
39245
- t.locale || "en",
39245
+ (t == null ? void 0 : t.locale) || "en",
39246
39246
  t
39247
39247
  ) : "", c = s.category ? be(
39248
39248
  s.category,
39249
- t.locale || "en",
39249
+ (t == null ? void 0 : t.locale) || "en",
39250
39250
  t
39251
39251
  ) : "", u = `${e.id}-Card-${r}`;
39252
39252
  return {
@@ -39444,12 +39444,12 @@ const iHe = ({
39444
39444
  const a = e.data.insights.constantValueEnabled, n = (s = gt(
39445
39445
  t,
39446
39446
  e.data.insights,
39447
- ((o = t.meta) == null ? void 0 : o.locale) || "en"
39447
+ ((o = t == null ? void 0 : t.meta) == null ? void 0 : o.locale) || "en"
39448
39448
  )) == null ? void 0 : s.insights, i = (n == null ? void 0 : n.map((u, f) => {
39449
39449
  var m, g, y, k, S, C;
39450
39450
  const p = u.name ? be(
39451
39451
  u.name,
39452
- t.locale || "en",
39452
+ (t == null ? void 0 : t.locale) || "en",
39453
39453
  t
39454
39454
  ) : "", h = `${e.id}-Card-${f}`;
39455
39455
  return {
@@ -39675,12 +39675,12 @@ const iHe = ({
39675
39675
  const a = e.data.people.constantValueEnabled, n = (s = gt(
39676
39676
  t,
39677
39677
  e.data.people,
39678
- ((o = t.meta) == null ? void 0 : o.locale) || "en"
39678
+ ((o = t == null ? void 0 : t.meta) == null ? void 0 : o.locale) || "en"
39679
39679
  )) == null ? void 0 : s.people, i = (n == null ? void 0 : n.map((u, f) => {
39680
39680
  var m, g, y, k, S;
39681
39681
  const p = u.name ? be(
39682
39682
  u.name,
39683
- t.locale || "en",
39683
+ (t == null ? void 0 : t.locale) || "en",
39684
39684
  t
39685
39685
  ) : "", h = `${e.id}-Card-${f}`;
39686
39686
  return {
@@ -40072,11 +40072,11 @@ const iHe = ({
40072
40072
  const a = e.data.testimonials.constantValueEnabled, n = (o = gt(
40073
40073
  t,
40074
40074
  e.data.testimonials,
40075
- t.locale || "en"
40075
+ (t == null ? void 0 : t.locale) || "en"
40076
40076
  )) == null ? void 0 : o.testimonials, i = (n == null ? void 0 : n.map((c, u) => {
40077
40077
  const f = c.contributorName ? be(
40078
40078
  c.contributorName,
40079
- t.locale || "en",
40079
+ (t == null ? void 0 : t.locale) || "en",
40080
40080
  t
40081
40081
  ) : "", p = `${e.id}-Card-${u}`;
40082
40082
  return {
@@ -40332,8 +40332,10 @@ const iHe = ({
40332
40332
  Directory: {
40333
40333
  action: "updated",
40334
40334
  propTransformation: (e, t) => {
40335
- const a = e.data.title, n = e.data.siteName, i = e.data.directoryRoot, o = e.styles.backgroundColor, s = e.styles.breadcrumbsBackgroundColor, r = A0(t.dm_directoryChildren), l = F1(
40336
- t.dm_directoryChildren,
40335
+ const a = e.data.title, n = e.data.siteName, i = e.data.directoryRoot, o = e.styles.backgroundColor, s = e.styles.breadcrumbsBackgroundColor, r = A0(
40336
+ (t == null ? void 0 : t.dm_directoryChildren) || []
40337
+ ), l = F1(
40338
+ (t == null ? void 0 : t.dm_directoryChildren) || [],
40337
40339
  "name"
40338
40340
  ), c = r ? (l == null ? void 0 : l.map((u, f) => {
40339
40341
  const p = `${e.id}-Card-${f}`;
@@ -67010,8 +67012,11 @@ const {
67010
67012
  ) : /* @__PURE__ */ d.jsx(vt, { children: t })
67011
67013
  ] });
67012
67014
  }, mWe = (e, t = "domestic") => {
67013
- const a = E3t(e);
67014
- return !a.valid || a.number === void 0 ? e : t === "international" ? a.number.international : a.number.national;
67015
+ const a = e.replace(
67016
+ /(?!^\+)\+|[^\d+]/g,
67017
+ ""
67018
+ ), n = E3t(a);
67019
+ return !n.valid || n.number === void 0 ? e : t === "international" ? n.number.international : n.number.national;
67015
67020
  }, Bt = x.forwardRef(
67016
67021
  ({ className: e, background: t, as: a, children: n, ...i }, o) => {
67017
67022
  var p;
@@ -82928,7 +82933,7 @@ const _c = {
82928
82933
  }, Bo = {
82929
82934
  name: { en: "First Last", hasLocalizedValue: "true" },
82930
82935
  title: { en: Yn("Associate Agent"), hasLocalizedValue: "true" },
82931
- phoneNumber: "(202) 770-6619",
82936
+ phoneNumber: "+12027706619",
82932
82937
  email: "jkelley@[company].com",
82933
82938
  cta: {
82934
82939
  label: { en: "Visit Profile", hasLocalizedValue: "true" },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yext/visual-editor",
3
3
  "description": "Component library for Yext Pages Visual Editor",
4
- "version": "1.0.0-beta.1",
4
+ "version": "1.0.0-beta.2",
5
5
  "type": "module",
6
6
  "author": "sumo@yext.com",
7
7
  "repository": {
@@ -129,7 +129,7 @@
129
129
  "zod": "^3.23.8"
130
130
  },
131
131
  "peerDependencies": {
132
- "@yext/pages-components": "^1.1.13",
132
+ "@yext/pages-components": "1.1.16",
133
133
  "@yext/search-headless-react": "^2.6.0",
134
134
  "@yext/search-ui-react": "^1.10.2",
135
135
  "mapbox-gl": "^2.9.2",