trimble-terra 1.1.14 → 1.1.16

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.
@@ -1,9 +1,9 @@
1
1
  import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
2
  import { useRef as E, useState as g, useEffect as j } from "react";
3
- import { QuantityTracker as K } from "../QuantityTracker/QuantityTracker.js";
3
+ import { QuantityTracker as q } from "../QuantityTracker/QuantityTracker.js";
4
4
  import { ErrorMessage as w } from "../QuantityTracker/ErrorMessage.js";
5
- import { TerraLink as k } from "../TerraLink/TerraLink.js";
6
- import q from "../ProductDetail/PromoCodeBadge/PromoCodeBadge.js";
5
+ import { TerraLink as K } from "../TerraLink/TerraLink.js";
6
+ import k from "../ProductDetail/PromoCodeBadge/PromoCodeBadge.js";
7
7
  import './FlyoutCartComponent.css';/* empty css */
8
8
  const O = {
9
9
  removeBtnLabel: "Remove",
@@ -22,38 +22,38 @@ function X({
22
22
  discountCode: M,
23
23
  duration: v,
24
24
  isMaxThresholdError: x = !1,
25
- link: h,
25
+ link: _,
26
26
  labels: T,
27
- settings: _ = { ...O },
27
+ settings: u = { ...O },
28
28
  isLoading: H = !1,
29
- onChangeQuantity: u = () => {
29
+ onChangeQuantity: d = () => {
30
30
  },
31
31
  onRemove: Q = () => {
32
32
  },
33
33
  LinkComponent: D
34
34
  }) {
35
- const p = E(null), [r, c] = g(i), [d, f] = g(null);
35
+ const p = E(null), [r, c] = g(i), [f, h] = g(null);
36
36
  j(() => {
37
37
  typeof i == "number" && c(i);
38
38
  }, [i]);
39
- const I = () => {
39
+ const L = () => {
40
40
  if (typeof r != "number") return;
41
- d && clearTimeout(d);
41
+ f && clearTimeout(f);
42
42
  const e = r - 1;
43
43
  c(e);
44
44
  const o = setTimeout(() => {
45
- u(l, n, a, e), f(null);
45
+ d(l, n, a, e), h(null);
46
46
  }, 1e3);
47
- f(o);
48
- }, L = () => {
47
+ h(o);
48
+ }, I = () => {
49
49
  if (typeof r != "number") return;
50
- d && clearTimeout(d);
50
+ f && clearTimeout(f);
51
51
  const e = r + 1;
52
52
  c(e);
53
53
  const o = setTimeout(() => {
54
- u(l, n, a, e), f(null);
54
+ d(l, n, a, e), h(null);
55
55
  }, 1e3);
56
- f(o);
56
+ h(o);
57
57
  }, V = (e) => {
58
58
  if (e.currentTarget.value === "") {
59
59
  c(0);
@@ -66,12 +66,12 @@ function X({
66
66
  }, F = () => {
67
67
  if (typeof r == "number") {
68
68
  if (r < 0) return;
69
- u(l, n, a, r);
69
+ d(l, n, a, r);
70
70
  } else
71
- c(1), u(l, n, a, 1);
71
+ c(1), d(l, n, a, 1);
72
72
  }, S = (e) => {
73
73
  e.key === "Enter" && p ? p?.current?.blur() : e.key.toLowerCase() === "e" && e.preventDefault();
74
- }, { removeBtnLabel: R = "Remove" } = _, N = typeof i == "number", Z = new Intl.NumberFormat(void 0, {
74
+ }, { removeBtnLabel: R = "Remove" } = u, N = typeof i == "number", Z = new Intl.NumberFormat(void 0, {
75
75
  style: "currency",
76
76
  currency: m?.currencyCode || "USD",
77
77
  currencyDisplay: "narrowSymbol"
@@ -104,7 +104,7 @@ function X({
104
104
  v && /* @__PURE__ */ t("span", { className: "ter-cart-item__duration", children: v })
105
105
  ] }),
106
106
  b && /* @__PURE__ */ t(
107
- q,
107
+ k,
108
108
  {
109
109
  discount: b,
110
110
  discountCode: M,
@@ -112,9 +112,9 @@ function X({
112
112
  }
113
113
  ),
114
114
  N && /* @__PURE__ */ s("div", { className: "ter-cart-item__qty", children: [
115
- /* @__PURE__ */ t("span", { className: "ter-cart-item__qty__label", children: T?.quantityLabel ?? "Quantity" }),
115
+ /* @__PURE__ */ t("span", { className: "ter-cart-item__qty__label", children: u?.quantityLabel ?? T?.quantityLabel ?? "Quantity" }),
116
116
  /* @__PURE__ */ t(
117
- K,
117
+ q,
118
118
  {
119
119
  ref: p,
120
120
  labelText: "",
@@ -123,8 +123,8 @@ function X({
123
123
  disabled: H,
124
124
  hasDeleteOption: !0,
125
125
  handleBlur: F,
126
- handleDecreaseQuantity: I,
127
- handleIncreaseQuantity: L,
126
+ handleDecreaseQuantity: L,
127
+ handleIncreaseQuantity: I,
128
128
  handleChangeQuantity: V,
129
129
  handleKeyDown: S
130
130
  }
@@ -157,13 +157,13 @@ function X({
157
157
  ]
158
158
  }
159
159
  ),
160
- Number(r) < 0 && /* @__PURE__ */ t(w, { errorMessage: _?.errorMessageForMinQuantity }),
161
- x && /* @__PURE__ */ t(w, { errorMessage: _?.errorMessageForMaxQuantity }),
162
- h && /* @__PURE__ */ t("div", { className: "ter-cart-item__link-wrapper", children: /* @__PURE__ */ t(
163
- k,
160
+ Number(r) < 0 && /* @__PURE__ */ t(w, { errorMessage: u?.errorMessageForMinQuantity }),
161
+ x && /* @__PURE__ */ t(w, { errorMessage: u?.errorMessageForMaxQuantity }),
162
+ _ && /* @__PURE__ */ t("div", { className: "ter-cart-item__link-wrapper", children: /* @__PURE__ */ t(
163
+ K,
164
164
  {
165
- label: h.text,
166
- destination: h.url,
165
+ label: _.text,
166
+ destination: _.url,
167
167
  linkType: "text",
168
168
  className: "ter-cart-item__link",
169
169
  LinkComponent: D
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trimble-terra",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "Trimble Terra — React component library for Trimble MXP2 web experiences",
5
5
  "publishConfig": {
6
6
  "access": "public"