@colabcommerce/elements 0.0.3 → 0.0.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/CartForm.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsx as t, Fragment as H, jsxs as f } from "react/jsx-runtime";
2
2
  import * as b from "react";
3
3
  import { useRef as ae, useState as E, useCallback as re, useContext as j, useMemo as Y, useEffect as q } from "react";
4
- import { C as ce, u as I, L as ie, d as le, g as de, b as ue, f as me, A as he, c as pe, w as fe, h as ge, e as _e } from "./addressComponentsToAddress-CNK2WJ24.js";
5
- import { L as ye, F as ve, a as Ce, Q as Ne } from "./index-DqABFy0O.js";
6
- import { _ as be, p as B, q as k, j as we, A as Se, a as x, k as Ie, M as Le, c as y, Q as K, e as xe, h as F, i as Ae, F as v, R as qe, C as L, O as P, B as G, l as Q, I as Be, m as ke } from "./globals-C3lGVSJ0.js";
7
- import { C as Me } from "./Container-7bFgo-eP.js";
4
+ import { C as ce, u as I, L as ie, d as le, g as de, b as ue, f as me, A as he, c as pe, w as fe, h as ge, e as _e } from "./addressComponentsToAddress-DCL-K8mn.js";
5
+ import { L as ye, F as ve, a as Ce, Q as Ne } from "./index-CqSfhXDd.js";
6
+ import { _ as be, p as B, q as k, j as we, A as Se, a as x, k as Ie, M as Le, c as y, Q as K, e as xe, h as F, i as Ae, F as v, R as qe, C as L, O as P, B as G, l as Q, I as Be, m as ke } from "./globals-B8-hYoIU.js";
7
+ import { C as Me } from "./Container-CU_WrBOi.js";
8
8
  function W() {
9
9
  return W = Object.assign ? Object.assign.bind() : function(e) {
10
10
  for (var n = 1; n < arguments.length; n++) {
@@ -1,4 +1,4 @@
1
- import { p as n, q as m } from "./globals-C3lGVSJ0.js";
1
+ import { p as n, q as m } from "./globals-B8-hYoIU.js";
2
2
  import * as p from "react";
3
3
  import { jsx as c } from "react/jsx-runtime";
4
4
  const x = /* @__PURE__ */ p.forwardRef(({
@@ -1,4 +1,4 @@
1
- import { w as Z, x as be, y as Q, r as de, z as Se, D as lt, G as ct, T as dt, t as ut, q as v, v as ft, E as ht, p as U, P as Ee, H as mt, J as gt, K as De, L as pt, N as Et } from "./globals-C3lGVSJ0.js";
1
+ import { w as Z, x as be, y as Q, r as de, z as Se, D as lt, G as ct, T as dt, t as ut, q as v, v as ft, E as ht, p as U, P as Ee, H as mt, J as gt, K as De, L as pt, N as Et } from "./globals-B8-hYoIU.js";
2
2
  import * as E from "react";
3
3
  import { useState as H, useRef as h, useEffect as R, useCallback as y, useContext as Ke, createContext as yt, useMemo as Ge, useLayoutEffect as Rt, cloneElement as Ne, forwardRef as vt, useImperativeHandle as Tt } from "react";
4
4
  import wt from "react-dom";
@@ -1,10 +1,10 @@
1
1
  import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
2
  import { useEffect as j, useState as E, Suspense as z } from "react";
3
- import { u as F, L as H, g as $, d as D, S as Q, b as U, k as J, f as V, A as K, c as G, w as X, h as Y, e as Z } from "./addressComponentsToAddress-CNK2WJ24.js";
4
- import { L as ee, F as te, Q as ae } from "./index-DqABFy0O.js";
5
- import { a as M, c as k, e as oe, h as b, i as ne, B as R, F as d, R as se, C as _, O as y, l as W, I as re, m as ie } from "./globals-C3lGVSJ0.js";
6
- import { S as le } from "./index-TPy0P4tu.js";
7
- const ce = () => {
3
+ import { u as F, L as H, g as R, d as D, S as Q, b as U, k as J, f as V, A as K, c as G, w as X, h as Y, e as Z } from "./addressComponentsToAddress-DCL-K8mn.js";
4
+ import { L as ee, F as te, Q as oe } from "./index-CqSfhXDd.js";
5
+ import { a as W, c as k, e as ae, h as b, i as ne, F as d, R as se, C as _, O as y, B as re, l as M, I as ie, m as le } from "./globals-B8-hYoIU.js";
6
+ import { S as ce } from "./index-FM02Uq_P.js";
7
+ const de = () => {
8
8
  const { locationName: m, setLocationName: l, setSearchCenter: c, setMapCenter: t, setLoadingGeo: f, getPosition: n } = F();
9
9
  return /* @__PURE__ */ e(
10
10
  H,
@@ -18,16 +18,16 @@ const ce = () => {
18
18
  }
19
19
  }
20
20
  );
21
- }, de = "_5BvSp", me = "NnCF-", ue = "OxA-3", he = "fIWeh", C = {
22
- loading: de,
23
- itemWrapper: me,
24
- selected: ue,
25
- wrapper: he
26
- }, pe = () => {
27
- const { t: m } = M(), { locations: l, isLoading: c, focusedLocationId: t } = F();
28
- function f(n, u) {
29
- if (!n || !u) return;
30
- const h = n.getBoundingClientRect(), i = u.getBoundingClientRect().top - h.top + n.scrollTop;
21
+ }, me = "_5BvSp", ue = "NnCF-", he = "OxA-3", pe = "fIWeh", C = {
22
+ loading: me,
23
+ itemWrapper: ue,
24
+ selected: he,
25
+ wrapper: pe
26
+ }, fe = () => {
27
+ const { t: m } = W(), { locations: l, isLoading: c, focusedLocationId: t } = F();
28
+ function f(n, h) {
29
+ if (!n || !h) return;
30
+ const p = n.getBoundingClientRect(), i = h.getBoundingClientRect().top - p.top + n.scrollTop;
31
31
  n.scrollTo({
32
32
  top: i,
33
33
  behavior: "smooth"
@@ -36,62 +36,61 @@ const ce = () => {
36
36
  return j(() => {
37
37
  const n = document.getElementById(`location-${t}`);
38
38
  if (n) {
39
- const u = document.getElementById("llw");
40
- f(u, n);
39
+ const h = document.getElementById("llw");
40
+ f(h, n);
41
41
  }
42
42
  }, [t]), c ? /* @__PURE__ */ e("div", { className: k(C.loading), children: /* @__PURE__ */ e("img", { src: "https://images.sofasandsectionals.com/cc/pal-loader.svg", width: "50", height: "50", alt: m("store_locator.loading") }) }) : /* @__PURE__ */ e("div", { className: k(C.wrapper), id: "llw", children: l.map((n) => /* @__PURE__ */ e("div", { className: t === n.id ? k(C.itemWrapper, C.selected) : k(C.itemWrapper), id: `location-${n.id}`, children: /* @__PURE__ */ e(ee, { id: n.id, location: n }) }, n.id)) });
43
- }, fe = "NQ6-h", _e = "_4wmyC", ge = "_9dVCP", P = {
44
- wrapper: fe,
45
- name: _e,
46
- address: ge
47
- }, ve = () => {
48
- var I, q, x, w, L, a, B;
49
- const { cc_company_retailer_location_id: m } = $(), { distanceUnit: l, searchCenter: c, selectedLocation: t, setSelectedLocationId: f, selectedLocationId: n, setMessageModalOpen: u, setShowMap: h, setShowDetails: v } = F(), i = D({ lat: (I = t == null ? void 0 : t.address) == null ? void 0 : I.latitude, lng: (q = t == null ? void 0 : t.address) == null ? void 0 : q.longitude }, c), o = l === "km" ? i : J(i), N = Math.round(o * 10) / 10, S = (x = t == null ? void 0 : t.store_type) != null && x.includes("Studio") ? "studio" : "retailer";
43
+ }, _e = "NQ6-h", ge = "_4wmyC", ve = "_9dVCP", P = {
44
+ wrapper: _e,
45
+ name: ge,
46
+ address: ve
47
+ }, Ne = () => {
48
+ var S, I, q, x, w, B, o;
49
+ const { cc_company_retailer_location_id: m } = R(), { distanceUnit: l, searchCenter: c, selectedLocation: t, setSelectedLocationId: f, selectedLocationId: n, setMessageModalOpen: h, setShowMap: p, setShowDetails: N } = F(), i = D({ lat: (S = t == null ? void 0 : t.address) == null ? void 0 : S.latitude, lng: (I = t == null ? void 0 : t.address) == null ? void 0 : I.longitude }, c), L = l === "km" ? i : J(i), a = Math.round(L * 10) / 10, g = (q = t == null ? void 0 : t.store_type) != null && q.includes("Studio") ? "studio" : "retailer";
50
50
  return !t || t.location_id === m ? null : /* @__PURE__ */ e("div", { children: /* @__PURE__ */ s("div", { className: P.wrapper, children: [
51
51
  /* @__PURE__ */ s("div", { className: "d-flex align-items-center justify-content-between", children: [
52
52
  /* @__PURE__ */ e("h3", { className: P.name, children: t == null ? void 0 : t.retailer_name }),
53
- /* @__PURE__ */ e("div", { className: "text-end", children: /* @__PURE__ */ e(Q, { type: S }) })
53
+ /* @__PURE__ */ e("div", { className: "text-end", children: /* @__PURE__ */ e(Q, { type: g }) })
54
54
  ] }),
55
55
  /* @__PURE__ */ s("div", { className: "text-muted fs-6 fw-normal mt-1", children: [
56
- N,
56
+ a,
57
57
  " ",
58
58
  l
59
59
  ] }),
60
60
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(U, { hours: t == null ? void 0 : t.retailer_location_hours }) }),
61
61
  /* @__PURE__ */ s("address", { className: P.address, children: [
62
- /* @__PURE__ */ e("div", { children: (w = t == null ? void 0 : t.address) == null ? void 0 : w.street_line_one }),
62
+ /* @__PURE__ */ e("div", { children: (x = t == null ? void 0 : t.address) == null ? void 0 : x.street_line_one }),
63
63
  /* @__PURE__ */ s("div", { children: [
64
- (L = t == null ? void 0 : t.address) == null ? void 0 : L.city,
64
+ (w = t == null ? void 0 : t.address) == null ? void 0 : w.city,
65
65
  ", ",
66
- (a = t == null ? void 0 : t.address) == null ? void 0 : a.province,
66
+ (B = t == null ? void 0 : t.address) == null ? void 0 : B.province,
67
67
  " ",
68
- (B = t == null ? void 0 : t.address) == null ? void 0 : B.postal_code
68
+ (o = t == null ? void 0 : t.address) == null ? void 0 : o.postal_code
69
69
  ] })
70
70
  ] })
71
71
  ] }) });
72
- }, Ne = "KsfpB", be = "t-v-7", ye = "UFm9T", Ce = "c3v8k", g = {
73
- changeLocationBtn: Ne,
74
- submitButton: be,
75
- successContainer: ye,
76
- successBtn: Ce
72
+ }, be = "KsfpB", ye = "t-v-7", Ce = "UFm9T", v = {
73
+ changeLocationBtn: be,
74
+ submitButton: ye,
75
+ successContainer: Ce
77
76
  }, Se = ({ id: m, product: l = null, onSuccess: c, onCancel: t, onClose: f, optInText: n }) => {
78
77
  l || console.warn("Colab Commerce: No product(s) provided to the ProductForm component.");
79
- const { cc_company_retailer_location_id: u } = $(), { selectedLocationId: h, setSelectedLocationId: v, searchCenter: i } = F(), { t: o } = M("default"), [N, S] = E(!1), [I, q] = E(!1), x = {
78
+ const { cc_company_retailer_location_id: h } = R(), { selectedLocationId: p, setSelectedLocationId: N, searchCenter: i, setFocusedLocationId: L } = F(), { t: a } = W("default"), [g, S] = E(!1), [I, q] = E(!1), x = {
80
79
  firstName: "",
81
80
  lastName: "",
82
81
  email: "",
83
82
  phone: "",
84
83
  notes: ""
85
- }, w = oe().shape({
86
- firstName: b().required(o("quote_form.first_name_required")),
87
- lastName: b().required(o("quote_form.last_name_required")),
88
- email: b().email(o("quote_form.invalid_email")).required(o("quote_form.email_required")),
89
- phone: b().required(o("quote_form.phone_required")),
84
+ }, w = ae().shape({
85
+ firstName: b().required(a("quote_form.first_name_required")),
86
+ lastName: b().required(a("quote_form.last_name_required")),
87
+ email: b().email(a("quote_form.invalid_email")).required(a("quote_form.email_required")),
88
+ phone: b().required(a("quote_form.phone_required")),
90
89
  notes: b()
91
- }), a = ne({
90
+ }), o = ne({
92
91
  initialValues: x,
93
92
  validationSchema: w,
94
- onSubmit: async (p) => {
93
+ onSubmit: async (u) => {
95
94
  X("AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M");
96
95
  const T = await K(i == null ? void 0 : i.lat, i == null ? void 0 : i.lng), r = G(T.results[0].address_components), A = await fetch("https://api.colabcommerce.com/widget_api/leads", {
97
96
  method: "POST",
@@ -101,11 +100,11 @@ const ce = () => {
101
100
  body: JSON.stringify({
102
101
  id: m,
103
102
  lead: {
104
- name: `${p.firstName} ${p.lastName}`,
105
- emails_attributes: [{ email: p.email }],
106
- phone_numbers_attributes: [{ phone_number: p.phone, country_code: "US" }],
107
- message: p.message,
108
- opt_in: p.optIn,
103
+ name: `${u.firstName} ${u.lastName}`,
104
+ emails_attributes: [{ email: u.email }],
105
+ phone_numbers_attributes: [{ phone_number: u.phone, country_code: "US" }],
106
+ message: u.message,
107
+ opt_in: u.optIn,
109
108
  location_attributes: {
110
109
  street_line_one: r == null ? void 0 : r.addressLine1,
111
110
  street_line_two: r == null ? void 0 : r.addressLine2,
@@ -116,12 +115,12 @@ const ce = () => {
116
115
  latitude: (i == null ? void 0 : i.lat) || null,
117
116
  longitude: (i == null ? void 0 : i.lng) || null
118
117
  },
119
- assignee_id: h || null,
118
+ assignee_id: p || null,
120
119
  assignee_type: "CompanyRetailerLocation",
121
120
  lead_activities_attributes: [{
122
121
  type: "LeadActivity::QuoteRequest",
123
122
  products: [l],
124
- notes: p.notes,
123
+ notes: u.notes,
125
124
  source_type: "Company",
126
125
  source_id: m
127
126
  }]
@@ -137,42 +136,38 @@ const ce = () => {
137
136
  }
138
137
  });
139
138
  j(() => {
140
- const p = document.getElementById("cc-accordion-anchor");
141
- p && p.scrollIntoView({ behavior: "instant" });
142
- }, [h]);
143
- const B = () => {
144
- S(!1), v(null), f && f();
139
+ const u = document.getElementById("cc-accordion-anchor");
140
+ u && u.scrollIntoView({ behavior: "instant" });
141
+ }, [p]);
142
+ const $ = (u) => {
143
+ L(u.id);
145
144
  };
146
145
  return /* @__PURE__ */ s("div", { className: "cc", children: [
147
- N && /* @__PURE__ */ e("div", { className: g.successContainer, children: /* @__PURE__ */ s("div", { className: "text-center", children: [
148
- /* @__PURE__ */ e("h2", { className: "fw-bold fs-2", style: { marginBottom: "3.2rem" }, children: o("cart_form.success_title") }),
149
- /* @__PURE__ */ e("div", { className: "fs-6", style: { fontWeight: 600, marginBottom: "3.2rem" }, children: o("cart_form.success_message") }),
150
- /* @__PURE__ */ e(R, { variant: "dark", className: g.successBtn, onClick: B, children: o("cart_form.success_button") })
151
- ] }) }),
152
- !N && /* @__PURE__ */ s("div", { id: "cc-accordion-anchor", children: [
153
- !h && /* @__PURE__ */ s("div", { children: [
154
- /* @__PURE__ */ e("div", { className: "mb-3", children: /* @__PURE__ */ e(ce, {}) }),
146
+ g && /* @__PURE__ */ e("div", { className: v.successContainer, children: /* @__PURE__ */ e("div", { className: "text-center", children: /* @__PURE__ */ e("h2", { className: "fw-bold fs-2", style: { marginBottom: "3.2rem" }, children: a("cart_form.success_title") }) }) }),
147
+ !g && /* @__PURE__ */ s("div", { id: "cc-accordion-anchor", children: [
148
+ !p && /* @__PURE__ */ s("div", { children: [
149
+ /* @__PURE__ */ e("div", { className: "mb-3", children: /* @__PURE__ */ e(de, {}) }),
155
150
  /* @__PURE__ */ s("div", { className: "position-relative", children: [
156
151
  /* @__PURE__ */ e(V, {}),
157
- /* @__PURE__ */ e(le, {})
152
+ /* @__PURE__ */ e(ce, { onMarkerClick: $ })
158
153
  ] }),
159
154
  /* @__PURE__ */ e(te, {}),
160
- /* @__PURE__ */ e(pe, {})
155
+ /* @__PURE__ */ e(fe, {})
161
156
  ] }),
162
- h && /* @__PURE__ */ s("div", { children: [
157
+ p && /* @__PURE__ */ s("div", { children: [
163
158
  /* @__PURE__ */ s("div", { children: [
164
159
  /* @__PURE__ */ s("div", { className: "d-flex align-items-center justify-content-between px-3 mb-2 fs-6", children: [
165
- /* @__PURE__ */ e("span", { className: "fw-bold", children: u === h ? "" : o("quote.selected_location.title") }),
166
- /* @__PURE__ */ e("button", { onClick: () => v(null), className: g.changeLocationBtn, children: o("quote.change_location") })
160
+ /* @__PURE__ */ e("span", { className: "fw-bold", children: h === p ? "" : a("quote.selected_location.title") }),
161
+ /* @__PURE__ */ e("button", { onClick: () => N(null), className: v.changeLocationBtn, children: a("quote.change_location") })
167
162
  ] }),
168
- /* @__PURE__ */ e("div", { className: g.selectedLocation, children: /* @__PURE__ */ e(ve, {}) })
163
+ /* @__PURE__ */ e("div", { className: v.selectedLocation, children: /* @__PURE__ */ e(Ne, {}) })
169
164
  ] }),
170
- /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e(d, { onSubmit: a.handleSubmit, className: g.form, children: /* @__PURE__ */ s(se, { children: [
165
+ /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e(d, { onSubmit: o.handleSubmit, className: v.form, children: /* @__PURE__ */ s(se, { children: [
171
166
  /* @__PURE__ */ e(_, { xs: 12, md: 12, children: /* @__PURE__ */ s(
172
167
  y,
173
168
  {
174
169
  controlId: "floatingInput",
175
- label: o("quote_form.first_name"),
170
+ label: a("quote_form.first_name"),
176
171
  className: "mb-3",
177
172
  children: [
178
173
  /* @__PURE__ */ e(
@@ -180,14 +175,14 @@ const ce = () => {
180
175
  {
181
176
  type: "text",
182
177
  name: "firstName",
183
- placeholder: o("quote_form.first_name_placeholder"),
184
- onChange: a.handleChange,
185
- value: a.values.firstName,
178
+ placeholder: a("quote_form.first_name_placeholder"),
179
+ onChange: o.handleChange,
180
+ value: o.values.firstName,
186
181
  className: "rounded-0",
187
- isInvalid: !!a.errors.firstName
182
+ isInvalid: !!o.errors.firstName
188
183
  }
189
184
  ),
190
- /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: a.errors.firstName })
185
+ /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: o.errors.firstName })
191
186
  ]
192
187
  }
193
188
  ) }),
@@ -195,7 +190,7 @@ const ce = () => {
195
190
  y,
196
191
  {
197
192
  controlId: "floatingInput",
198
- label: o("quote_form.last_name"),
193
+ label: a("quote_form.last_name"),
199
194
  className: "mb-3",
200
195
  children: [
201
196
  /* @__PURE__ */ e(
@@ -204,13 +199,13 @@ const ce = () => {
204
199
  type: "text",
205
200
  name: "lastName",
206
201
  className: "rounded-0",
207
- placeholder: o("quote_form.last_name_placeholder"),
208
- onChange: a.handleChange,
209
- value: a.values.lastName,
210
- isInvalid: !!a.errors.lastName
202
+ placeholder: a("quote_form.last_name_placeholder"),
203
+ onChange: o.handleChange,
204
+ value: o.values.lastName,
205
+ isInvalid: !!o.errors.lastName
211
206
  }
212
207
  ),
213
- /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: a.errors.lastName })
208
+ /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: o.errors.lastName })
214
209
  ]
215
210
  }
216
211
  ) }),
@@ -218,7 +213,7 @@ const ce = () => {
218
213
  y,
219
214
  {
220
215
  controlId: "floatingInput",
221
- label: o("quote_form.email"),
216
+ label: a("quote_form.email"),
222
217
  className: "mb-3",
223
218
  children: [
224
219
  /* @__PURE__ */ e(
@@ -227,13 +222,13 @@ const ce = () => {
227
222
  type: "email",
228
223
  name: "email",
229
224
  className: "rounded-0",
230
- placeholder: o("quote_form.email_placeholder"),
231
- onChange: a.handleChange,
232
- value: a.values.email,
233
- isInvalid: !!a.errors.email
225
+ placeholder: a("quote_form.email_placeholder"),
226
+ onChange: o.handleChange,
227
+ value: o.values.email,
228
+ isInvalid: !!o.errors.email
234
229
  }
235
230
  ),
236
- /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: a.errors.email })
231
+ /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: o.errors.email })
237
232
  ]
238
233
  }
239
234
  ) }),
@@ -241,7 +236,7 @@ const ce = () => {
241
236
  y,
242
237
  {
243
238
  controlId: "floatingInput",
244
- label: o("quote_form.phone"),
239
+ label: a("quote_form.phone"),
245
240
  className: "mb-3",
246
241
  children: [
247
242
  /* @__PURE__ */ e(
@@ -250,13 +245,13 @@ const ce = () => {
250
245
  type: "text",
251
246
  name: "phone",
252
247
  className: "rounded-0",
253
- placeholder: o("quote_form.phone_placeholder"),
254
- onChange: a.handleChange,
255
- value: a.values.phone,
256
- isInvalid: !!a.errors.phone
248
+ placeholder: a("quote_form.phone_placeholder"),
249
+ onChange: o.handleChange,
250
+ value: o.values.phone,
251
+ isInvalid: !!o.errors.phone
257
252
  }
258
253
  ),
259
- /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: a.errors.phone })
254
+ /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: o.errors.phone })
260
255
  ]
261
256
  }
262
257
  ) }),
@@ -264,8 +259,8 @@ const ce = () => {
264
259
  y,
265
260
  {
266
261
  controlId: "floatingTextarea",
267
- label: o("quote_form.notes"),
268
- className: ["mb-3", g.textarea].join(" "),
262
+ label: a("quote_form.notes"),
263
+ className: ["mb-3", v.textarea].join(" "),
269
264
  children: [
270
265
  /* @__PURE__ */ e(
271
266
  d.Control,
@@ -273,14 +268,14 @@ const ce = () => {
273
268
  as: "textarea",
274
269
  name: "notes",
275
270
  className: "rounded-0",
276
- placeholder: o("quote_form.notes_placeholder"),
277
- onChange: a.handleChange,
278
- value: a.values.notes,
279
- isInvalid: !!a.errors.notes,
271
+ placeholder: a("quote_form.notes_placeholder"),
272
+ onChange: o.handleChange,
273
+ value: o.values.notes,
274
+ isInvalid: !!o.errors.notes,
280
275
  style: { height: "100px" }
281
276
  }
282
277
  ),
283
- /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: a.errors.notes })
278
+ /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: o.errors.notes })
284
279
  ]
285
280
  }
286
281
  ) }),
@@ -292,22 +287,22 @@ const ce = () => {
292
287
  type: "checkbox",
293
288
  label: n,
294
289
  className: "mb-3 fs-6",
295
- onChange: a.handleChange,
296
- isInvalid: !!a.errors.optIn
290
+ onChange: o.handleChange,
291
+ isInvalid: !!o.errors.optIn
297
292
  }
298
293
  ),
299
- /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: a.errors.optIn })
294
+ /* @__PURE__ */ e(d.Control.Feedback, { type: "invalid", children: o.errors.optIn })
300
295
  ] }),
301
296
  /* @__PURE__ */ s(_, { xs: 12, className: "text-start d-flex align-items-center", children: [
302
- /* @__PURE__ */ e(R, { type: "submit", variant: "dark", className: g.submitButton, disabled: N, children: a.isSubmitting ? o("quote.submitting") : o("quote_form.submit") }),
303
- I && /* @__PURE__ */ e("div", { className: "text-danger ms-2", children: o("quote_form.error") }),
304
- N && /* @__PURE__ */ e("div", { className: "text-success ms-2", children: o("quote_form.success") })
297
+ /* @__PURE__ */ e(re, { type: "submit", variant: "dark", className: v.submitButton, disabled: g, children: o.isSubmitting ? a("quote.submitting") : a("quote_form.submit") }),
298
+ I && /* @__PURE__ */ e("div", { className: "text-danger ms-2", children: a("quote_form.error") }),
299
+ g && /* @__PURE__ */ e("div", { className: "text-success ms-2", children: a("quote_form.success") })
305
300
  ] })
306
301
  ] }) }) })
307
302
  ] })
308
303
  ] })
309
304
  ] });
310
- }, Fe = ({
305
+ }, Le = ({
311
306
  id: m,
312
307
  // The entity ID for the Store Locator.
313
308
  locale: l,
@@ -315,12 +310,12 @@ const ce = () => {
315
310
  filterRetailerByStockedProduct: t = !1,
316
311
  filterRetailerByAvailableProduct: f = !1,
317
312
  optInText: n = null,
318
- onCancel: u,
319
- onClose: h,
320
- onSuccess: v
313
+ onCancel: h,
314
+ onClose: p,
315
+ onSuccess: N
321
316
  }) => (j(() => {
322
- W.changeLanguage(l);
323
- }, [l]), c || (console.warn("Colab Commerce: No product(s) provided to the ProductForm component."), c = []), /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(re, { i18n: W, children: /* @__PURE__ */ e(ie, { apiKey: "AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M", libraries: ["places"], children: /* @__PURE__ */ e(Y, { id: m, children: /* @__PURE__ */ e(
317
+ M.changeLanguage(l);
318
+ }, [l]), c || (console.warn("Colab Commerce: No product(s) provided to the ProductForm component."), c = []), /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(ie, { i18n: M, children: /* @__PURE__ */ e(le, { apiKey: "AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M", libraries: ["places"], children: /* @__PURE__ */ e(Y, { id: m, children: /* @__PURE__ */ e(
324
319
  Z,
325
320
  {
326
321
  id: m,
@@ -330,19 +325,19 @@ const ce = () => {
330
325
  optInText: n,
331
326
  autoLocate: !0,
332
327
  products: [c],
333
- children: /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
328
+ children: /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(
334
329
  Se,
335
330
  {
336
331
  id: m,
337
332
  product: c,
338
- onSuccess: v,
333
+ onSuccess: N,
339
334
  optInText: n,
340
- onCancel: u,
341
- onClose: h
335
+ onCancel: h,
336
+ onClose: p
342
337
  }
343
338
  ) })
344
339
  }
345
340
  ) }) }) }) }));
346
341
  export {
347
- Fe as default
342
+ Le as default
348
343
  };
package/dist/Retailer.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as v, jsxs as N, Fragment as Ze } from "react/jsx-runtime";
2
2
  import k, { createContext as Be, useState as X, useEffect as re, useContext as xt, forwardRef as Qe, useRef as U, useLayoutEffect as Tt } from "react";
3
- import { u as Et, f as Ct, a as se, b as Pt, c as L, d as Ve, B as Ae, R as Z, C as q, e as Mt, g as It, h as pe, i as Lt, F as D, j as _t, A as Ot, k as Nt, M as zt, l as Re, I as At, m as $t } from "./globals-C3lGVSJ0.js";
4
- import { C as $e } from "./Container-7bFgo-eP.js";
5
- import { M as me } from "./Modal-BqRDRCTs.js";
3
+ import { u as Et, f as Ct, a as se, b as Pt, c as L, d as Ve, B as Ae, R as Z, C as q, e as Mt, g as It, h as pe, i as Lt, F as D, j as _t, A as Ot, k as Nt, M as zt, l as Re, I as At, m as $t } from "./globals-B8-hYoIU.js";
4
+ import { C as $e } from "./Container-CU_WrBOi.js";
5
+ import { M as me } from "./Modal-DTBKy_6d.js";
6
6
  const Je = Be(), kt = ({ id: t, lng: e, children: i }) => {
7
7
  const [s, n] = X(e), [r, l] = X(!1);
8
8
  re(() => {