trimble-terra 1.1.22 → 1.1.24
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/src/component/Dialog/Dialog.css +1 -1
- package/dist/src/component/Dialog/Dialog.d.ts +2 -2
- package/dist/src/component/Dialog/Dialog.d.ts.map +1 -1
- package/dist/src/component/Dialog/Dialog.js +21 -21
- package/dist/src/component/ProductDetail/ProductDetail.stories.d.ts.map +1 -1
- package/dist/src/component/TrimbleDeveloper/TDHeader.d.ts.map +1 -1
- package/dist/src/component/TrimbleDeveloper/TDHeader.js +29 -23
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.t2-dialog{position:fixed;z-index:5;background:#fff;max-width:
|
|
1
|
+
@keyframes t2-dialog-open{0%{opacity:0;transform:translate(-50%,-48%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}.t2-dialog{position:fixed;z-index:5;box-sizing:border-box;background:#fff;max-width:560px;top:40%;left:50%;transform:translate(-50%,-50%);padding:24px 32px;border-radius:10px;box-shadow:0 110px 31px #0000,0 70px 28px #00000003,0 40px 24px #0000000d,0 18px 18px #00000017,0 4px 10px #0000001a;text-transform:none}.t2-dialog p:first-of-type{margin-top:0}.t2-dialog p:last-of-type{margin-bottom:0}@media not (min-width:600px){.t2-dialog{width:90%;height:auto}}.t2-dialog__overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000;background:#3635454d}.t2-dialog__close{all:unset;position:absolute;top:33px;right:32px;margin:0;padding:0;cursor:pointer}.t2-dialog__close:focus{outline:revert}.t2-dialog__title{color:#353a40;font-size:1.5rem;font-style:normal;font-weight:700;line-height:1.875rem;letter-spacing:1.92px}.t2-dialog__title{letter-spacing:.5px;margin:0 0 8px}.t2-dialog__content,.t2-dialog__content__text,.t2-dialog__content__text-holder{color:#353a40;font-size:1.125rem;font-style:normal;font-weight:400;line-height:2rem;letter-spacing:.18px}@media screen and (max-width:600px){.t2-dialog__content,.t2-dialog__content__text,.t2-dialog__content__text-holder{font-size:1rem;line-height:1.375rem}}.t2-dialog__content--link,.t2-dialog__content__text--link,.t2-dialog__content__text-holder--link{color:#353a40;font-size:1.125rem;font-style:normal;font-weight:400;line-height:2rem;letter-spacing:.18px}@media screen and (max-width:600px){.t2-dialog__content--link,.t2-dialog__content__text--link,.t2-dialog__content__text-holder--link{font-size:1rem;line-height:1.375rem}}.t2-dialog__buttons{display:flex;gap:12px;flex-direction:row;justify-content:flex-end;margin-top:16px}@media not (min-width:600px){.t2-dialog__buttons{flex-direction:column-reverse}}.t2-dialog--opened{animation:t2-dialog-open .2s ease-out}.t2-dialog--closed{display:none}.t2-dialog-loading__section{display:flex;gap:12px;flex-direction:column;align-items:center;justify-content:center;margin-bottom:24px;margin-top:12px}.t2-dialog-loading__text{color:#0063a3;line-height:27px;letter-spacing:.15;color:#353a40;font-size:1.125rem;font-style:normal;font-weight:400;line-height:2rem;letter-spacing:.18px}@media screen and (max-width:600px){.t2-dialog-loading__text{font-size:1rem;line-height:1.375rem}}
|
|
@@ -6,8 +6,8 @@ interface DialogProps {
|
|
|
6
6
|
loadingText?: string;
|
|
7
7
|
primaryButtonText: string;
|
|
8
8
|
secondaryButtonText?: string;
|
|
9
|
-
onCloseButtonClick?: () => void;
|
|
10
|
-
onPrimaryButtonClick?: (
|
|
9
|
+
onCloseButtonClick?: (e?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
10
|
+
onPrimaryButtonClick?: () => void;
|
|
11
11
|
onSecondaryButtonClick?: () => void;
|
|
12
12
|
contentWithLink?: string;
|
|
13
13
|
contentLink?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/component/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAKvB,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/component/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAKvB,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACvE,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,QAAA,MAAM,MAAM,GAAI,OAAO,WAAW,4CAqGjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -2,27 +2,27 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
2
2
|
import './Dialog.css';/* empty css */
|
|
3
3
|
import L from "../LoadingSpinner/LoadingSpinner.js";
|
|
4
4
|
import { checkAndSet as x } from "../../utils/checkForDangerouslySet.js";
|
|
5
|
-
import { TerraLink as
|
|
6
|
-
const w = (
|
|
5
|
+
import { TerraLink as i } from "../TerraLink/TerraLink.js";
|
|
6
|
+
const w = (m) => {
|
|
7
7
|
const {
|
|
8
8
|
isOpen: o,
|
|
9
9
|
variant: u,
|
|
10
10
|
title: a,
|
|
11
11
|
content: r,
|
|
12
|
-
loadingText:
|
|
12
|
+
loadingText: c,
|
|
13
13
|
primaryButtonText: h = "OK",
|
|
14
14
|
secondaryButtonText: _ = "Cancel",
|
|
15
|
-
onCloseButtonClick:
|
|
15
|
+
onCloseButtonClick: d,
|
|
16
16
|
onPrimaryButtonClick: l,
|
|
17
|
-
onSecondaryButtonClick:
|
|
18
|
-
contentWithLink:
|
|
17
|
+
onSecondaryButtonClick: e,
|
|
18
|
+
contentWithLink: s,
|
|
19
19
|
contentLink: C,
|
|
20
|
-
contentLinkText:
|
|
21
|
-
} =
|
|
20
|
+
contentLinkText: g
|
|
21
|
+
} = m, p = () => d ? /* @__PURE__ */ t(
|
|
22
22
|
"button",
|
|
23
23
|
{
|
|
24
24
|
className: "t2-dialog__close",
|
|
25
|
-
onClick:
|
|
25
|
+
onClick: d,
|
|
26
26
|
"aria-label": "Close Dialog",
|
|
27
27
|
children: /* @__PURE__ */ t(
|
|
28
28
|
"svg",
|
|
@@ -42,21 +42,21 @@ const w = (g) => {
|
|
|
42
42
|
}
|
|
43
43
|
)
|
|
44
44
|
}
|
|
45
|
-
) : null, k = () => l ||
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
) : null, k = () => l || e ? /* @__PURE__ */ n("div", { className: "t2-dialog__buttons", children: [
|
|
46
|
+
e && /* @__PURE__ */ t(
|
|
47
|
+
i,
|
|
48
48
|
{
|
|
49
49
|
label: _,
|
|
50
|
-
size: "
|
|
51
|
-
onClickHandler:
|
|
50
|
+
size: "large",
|
|
51
|
+
onClickHandler: e
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
54
|
l && /* @__PURE__ */ t(
|
|
55
|
-
|
|
55
|
+
i,
|
|
56
56
|
{
|
|
57
57
|
label: h,
|
|
58
58
|
primary: !0,
|
|
59
|
-
size: "
|
|
59
|
+
size: "large",
|
|
60
60
|
onClickHandler: l
|
|
61
61
|
}
|
|
62
62
|
)
|
|
@@ -69,20 +69,20 @@ const w = (g) => {
|
|
|
69
69
|
/* @__PURE__ */ t(p, {}),
|
|
70
70
|
u === "loading" && /* @__PURE__ */ n("div", { className: "t2-dialog-loading__section", children: [
|
|
71
71
|
/* @__PURE__ */ t(L, {}),
|
|
72
|
-
|
|
72
|
+
c && /* @__PURE__ */ t("span", { className: "t2-dialog-loading__text", children: c })
|
|
73
73
|
] }),
|
|
74
74
|
a && /* @__PURE__ */ t("h6", { className: "t2-dialog__title", children: a }),
|
|
75
75
|
r && x(r, "t2-dialog__content", null, null),
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
s && C && g && /* @__PURE__ */ n("div", { className: "t2-dialog__content", children: [
|
|
77
|
+
s,
|
|
78
78
|
" ",
|
|
79
79
|
/* @__PURE__ */ t(
|
|
80
|
-
|
|
80
|
+
i,
|
|
81
81
|
{
|
|
82
82
|
className: "t2-dialog__content--link",
|
|
83
83
|
destination: C,
|
|
84
84
|
linkType: "text",
|
|
85
|
-
children:
|
|
85
|
+
children: g
|
|
86
86
|
}
|
|
87
87
|
)
|
|
88
88
|
] }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductDetail.stories.d.ts","sourceRoot":"","sources":["../../../../src/component/ProductDetail/ProductDetail.stories.jsx"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ProductDetail.stories.d.ts","sourceRoot":"","sources":["../../../../src/component/ProductDetail/ProductDetail.stories.jsx"],"names":[],"mappings":";;;;;;;;;;;;AAiEA,4EAyDC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA2Nc,gCAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtRP,mFAyDC;;;;;;;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F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8GAA8G;IAC9G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wFAAwF;IACxF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,oEAAoE;IACpE,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,yEAAyE;IACzE,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,oEAAoE;IACpE,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAsED;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,GAAI,qQAmBtB,aAAa,4CA4jBf,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as g, useRef as te, useEffect as
|
|
2
|
+
import { useState as g, useRef as te, useEffect as T, useCallback as c } from "react";
|
|
3
3
|
import { TerraLink as p } from "../TerraLink/TerraLink.js";
|
|
4
4
|
import { TrimbleAssistantIcon as W } from "./TrimbleAssistantIcon.js";
|
|
5
5
|
import { TrimbleDeveloperLogo as le } from "./TrimbleDeveloperLogo.js";
|
|
@@ -42,7 +42,7 @@ const V = (d) => {
|
|
|
42
42
|
navLinks: k = [],
|
|
43
43
|
helpLinks: N = [],
|
|
44
44
|
user: n,
|
|
45
|
-
onLogoClick:
|
|
45
|
+
onLogoClick: C,
|
|
46
46
|
onNavItemClick: m,
|
|
47
47
|
onAssistantClick: z,
|
|
48
48
|
onNotificationsClick: E,
|
|
@@ -50,34 +50,34 @@ const V = (d) => {
|
|
|
50
50
|
onProfileMenuItemClick: B,
|
|
51
51
|
onSignOut: O
|
|
52
52
|
}) => {
|
|
53
|
-
const [s,
|
|
53
|
+
const [s, w] = g("light"), [U, K] = g(!1), [f, v] = g(!1), x = te(null), [S, _] = g(!1), [H, q] = g(
|
|
54
54
|
{}
|
|
55
55
|
);
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
T(() => {
|
|
57
|
+
w(ce());
|
|
58
58
|
}, []);
|
|
59
59
|
const A = c(() => {
|
|
60
|
-
|
|
60
|
+
w((e) => {
|
|
61
61
|
const t = e === "dark" ? "light" : "dark";
|
|
62
62
|
return L(t), t;
|
|
63
63
|
});
|
|
64
64
|
}, []), F = c(
|
|
65
65
|
(e) => {
|
|
66
66
|
const l = !!e.detail?.target?.checked ? "dark" : "light";
|
|
67
|
-
|
|
67
|
+
w(l), L(l);
|
|
68
68
|
},
|
|
69
69
|
[]
|
|
70
70
|
), G = c(
|
|
71
71
|
(e) => {
|
|
72
|
-
|
|
72
|
+
C && (e.preventDefault(), C());
|
|
73
73
|
},
|
|
74
|
-
[
|
|
74
|
+
[C]
|
|
75
75
|
), Q = c(
|
|
76
76
|
(e) => {
|
|
77
77
|
m?.(e.value ?? e.label);
|
|
78
78
|
},
|
|
79
79
|
[m]
|
|
80
|
-
),
|
|
80
|
+
), P = c(
|
|
81
81
|
(e) => {
|
|
82
82
|
m?.(e.value ?? e.label), document.querySelectorAll(
|
|
83
83
|
"modus-wc-dropdown-menu"
|
|
@@ -87,10 +87,10 @@ const V = (d) => {
|
|
|
87
87
|
},
|
|
88
88
|
[m]
|
|
89
89
|
);
|
|
90
|
-
|
|
90
|
+
T(() => {
|
|
91
91
|
if (!f) return;
|
|
92
92
|
const e = (l) => {
|
|
93
|
-
|
|
93
|
+
x.current?.contains(l.target) || v(!1);
|
|
94
94
|
}, t = (l) => {
|
|
95
95
|
l.key === "Escape" && v(!1);
|
|
96
96
|
};
|
|
@@ -100,13 +100,13 @@ const V = (d) => {
|
|
|
100
100
|
}, [f]);
|
|
101
101
|
const X = c(
|
|
102
102
|
(e) => {
|
|
103
|
-
B?.(e.detail),
|
|
103
|
+
B?.(e.detail), x.current?.querySelector(".td-header__profile-button")?.classList.toggle("td-header__profile-button--active"), v(!1);
|
|
104
104
|
},
|
|
105
105
|
[B]
|
|
106
106
|
), Y = c(() => {
|
|
107
107
|
O?.(), v(!1);
|
|
108
108
|
}, [O]);
|
|
109
|
-
|
|
109
|
+
T(() => {
|
|
110
110
|
const e = window.matchMedia("(max-width: 639px)"), t = (l) => {
|
|
111
111
|
l.matches || _(!1);
|
|
112
112
|
};
|
|
@@ -117,7 +117,7 @@ const V = (d) => {
|
|
|
117
117
|
m?.(e.value ?? e.label), _(!1);
|
|
118
118
|
},
|
|
119
119
|
[m]
|
|
120
|
-
),
|
|
120
|
+
), I = c(
|
|
121
121
|
(e) => {
|
|
122
122
|
m?.(e.value ?? e.label), _(!1);
|
|
123
123
|
},
|
|
@@ -150,14 +150,14 @@ const V = (d) => {
|
|
|
150
150
|
shape: "square",
|
|
151
151
|
"aria-label": "Menu",
|
|
152
152
|
"aria-haspopup": "menu",
|
|
153
|
-
"aria-expanded":
|
|
153
|
+
"aria-expanded": S,
|
|
154
154
|
"aria-controls": "td-header-mobile-menu",
|
|
155
155
|
onButtonClick: () => _((e) => !e),
|
|
156
156
|
className: "td-header__button td-header__mobile-toggle",
|
|
157
157
|
children: /* @__PURE__ */ a(
|
|
158
158
|
u,
|
|
159
159
|
{
|
|
160
|
-
name:
|
|
160
|
+
name: S ? "close" : "menu",
|
|
161
161
|
size: "sm",
|
|
162
162
|
decorative: !0
|
|
163
163
|
}
|
|
@@ -205,7 +205,7 @@ const V = (d) => {
|
|
|
205
205
|
destination: t.href ?? "#",
|
|
206
206
|
label: t.label,
|
|
207
207
|
linkType: "text",
|
|
208
|
-
onClickHandler: () =>
|
|
208
|
+
onClickHandler: () => P(t)
|
|
209
209
|
},
|
|
210
210
|
t.value ?? t.label
|
|
211
211
|
)) })
|
|
@@ -271,7 +271,7 @@ const V = (d) => {
|
|
|
271
271
|
destination: e.href ?? "#",
|
|
272
272
|
label: e.label,
|
|
273
273
|
linkType: "text",
|
|
274
|
-
onClickHandler: () =>
|
|
274
|
+
onClickHandler: () => P(e)
|
|
275
275
|
},
|
|
276
276
|
e.value ?? e.label
|
|
277
277
|
)) })
|
|
@@ -321,7 +321,7 @@ const V = (d) => {
|
|
|
321
321
|
)
|
|
322
322
|
}
|
|
323
323
|
),
|
|
324
|
-
n ? /* @__PURE__ */ r("div", { className: "td-header__profile", ref:
|
|
324
|
+
n ? /* @__PURE__ */ r("div", { className: "td-header__profile", ref: x, children: [
|
|
325
325
|
/* @__PURE__ */ a(
|
|
326
326
|
h,
|
|
327
327
|
{
|
|
@@ -359,6 +359,12 @@ const V = (d) => {
|
|
|
359
359
|
userEmail: n.email ?? "",
|
|
360
360
|
...n.manageTrimbleIdHref ? { manageTrimbleId: { link: n.manageTrimbleIdHref } } : {}
|
|
361
361
|
},
|
|
362
|
+
mainMenu: {
|
|
363
|
+
myProducts: !1,
|
|
364
|
+
supportCenter: !1,
|
|
365
|
+
items: !1,
|
|
366
|
+
adminSettings: !1
|
|
367
|
+
},
|
|
362
368
|
menuOne: V(n.profileMenuOne),
|
|
363
369
|
menuTwo: V(n.profileMenuTwo),
|
|
364
370
|
onMenuItemClick: X,
|
|
@@ -387,7 +393,7 @@ const V = (d) => {
|
|
|
387
393
|
{
|
|
388
394
|
id: "td-header-mobile-menu",
|
|
389
395
|
className: "td-header__mobile-menu",
|
|
390
|
-
hidden: !
|
|
396
|
+
hidden: !S,
|
|
391
397
|
children: [
|
|
392
398
|
ee && /* @__PURE__ */ a(
|
|
393
399
|
"nav",
|
|
@@ -420,7 +426,7 @@ const V = (d) => {
|
|
|
420
426
|
destination: l.href ?? "#",
|
|
421
427
|
label: l.label,
|
|
422
428
|
linkType: "text",
|
|
423
|
-
onClickHandler: () =>
|
|
429
|
+
onClickHandler: () => I(l)
|
|
424
430
|
},
|
|
425
431
|
l.value ?? l.label
|
|
426
432
|
))
|
|
@@ -484,7 +490,7 @@ const V = (d) => {
|
|
|
484
490
|
destination: e.href ?? "#",
|
|
485
491
|
label: e.label,
|
|
486
492
|
linkType: "text",
|
|
487
|
-
onClickHandler: () =>
|
|
493
|
+
onClickHandler: () => I(e)
|
|
488
494
|
},
|
|
489
495
|
e.value ?? e.label
|
|
490
496
|
)) })
|