@uniformdev/mesh-sdk-react 18.9.1-alpha.4 → 18.11.0
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 +36 -87
- package/dist/index.js +127 -178
- package/dist/index.mjs +36 -87
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -27,9 +27,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
27
27
|
// src/index.ts
|
|
28
28
|
var src_exports = {};
|
|
29
29
|
__export(src_exports, {
|
|
30
|
-
AddListButton: () =>
|
|
31
|
-
Button: () =>
|
|
32
|
-
Callout: () =>
|
|
30
|
+
AddListButton: () => import_design_system22.AddListButton,
|
|
31
|
+
Button: () => import_design_system22.Button,
|
|
32
|
+
Callout: () => import_design_system22.Callout,
|
|
33
33
|
DamSelectedItem: () => DamSelectedItem,
|
|
34
34
|
DataResourceVariablesList: () => DataResourceVariablesList,
|
|
35
35
|
DataSourceEditor: () => DataSourceEditor,
|
|
@@ -37,20 +37,20 @@ __export(src_exports, {
|
|
|
37
37
|
DefaultSearchRow: () => DefaultSearchRow,
|
|
38
38
|
DefaultSelectedItem: () => DefaultSelectedItem,
|
|
39
39
|
EntrySearch: () => EntrySearch,
|
|
40
|
-
Heading: () =>
|
|
40
|
+
Heading: () => import_design_system22.Heading,
|
|
41
41
|
Icons: () => icons_exports,
|
|
42
|
-
Input: () =>
|
|
43
|
-
InputComboBox: () =>
|
|
44
|
-
InputKeywordSearch: () =>
|
|
45
|
-
InputSelect: () =>
|
|
46
|
-
InputToggle: () =>
|
|
42
|
+
Input: () => import_design_system22.Input,
|
|
43
|
+
InputComboBox: () => import_design_system22.InputComboBox,
|
|
44
|
+
InputKeywordSearch: () => import_design_system22.InputKeywordSearch,
|
|
45
|
+
InputSelect: () => import_design_system22.InputSelect,
|
|
46
|
+
InputToggle: () => import_design_system22.InputToggle,
|
|
47
47
|
InputVariables: () => InputVariables,
|
|
48
|
-
KeywordSearchInput: () =>
|
|
49
|
-
Label: () =>
|
|
50
|
-
LoadingIndicator: () =>
|
|
51
|
-
LoadingOverlay: () =>
|
|
52
|
-
Menu: () =>
|
|
53
|
-
MenuItem: () =>
|
|
48
|
+
KeywordSearchInput: () => import_design_system22.InputKeywordSearch,
|
|
49
|
+
Label: () => import_design_system22.Label,
|
|
50
|
+
LoadingIndicator: () => import_design_system22.LoadingIndicator,
|
|
51
|
+
LoadingOverlay: () => import_design_system22.LoadingOverlay,
|
|
52
|
+
Menu: () => import_design_system22.Menu,
|
|
53
|
+
MenuItem: () => import_design_system22.MenuItem,
|
|
54
54
|
MeshApp: () => MeshApp,
|
|
55
55
|
ProductPreviewList: () => ProductPreviewList,
|
|
56
56
|
ProductQuery: () => ProductQuery,
|
|
@@ -68,13 +68,13 @@ __export(src_exports, {
|
|
|
68
68
|
RequestUrl: () => RequestUrl,
|
|
69
69
|
RequestUrlInput: () => RequestUrlInput,
|
|
70
70
|
ResolvableLoadingValue: () => ResolvableLoadingValue,
|
|
71
|
-
ScrollableList: () =>
|
|
72
|
-
ScrollableListItem: () =>
|
|
71
|
+
ScrollableList: () => import_design_system22.ScrollableList,
|
|
72
|
+
ScrollableListItem: () => import_design_system22.ScrollableListItem,
|
|
73
73
|
SelectionField: () => SelectionField,
|
|
74
|
-
Switch: () =>
|
|
74
|
+
Switch: () => import_design_system22.Switch,
|
|
75
75
|
TextVariableRenderer: () => TextVariableRenderer,
|
|
76
|
-
Textarea: () =>
|
|
77
|
-
Theme: () =>
|
|
76
|
+
Textarea: () => import_design_system22.Textarea,
|
|
77
|
+
Theme: () => import_design_system22.Theme,
|
|
78
78
|
UniformMeshLocationContext: () => UniformMeshLocationContext,
|
|
79
79
|
UniformMeshLocationContextProvider: () => UniformMeshLocationContextProvider,
|
|
80
80
|
UniformMeshSdkContext: () => UniformMeshSdkContext,
|
|
@@ -1110,12 +1110,13 @@ var ProductPreviewList = ({
|
|
|
1110
1110
|
};
|
|
1111
1111
|
|
|
1112
1112
|
// src/components/commerce/ProductSearch.tsx
|
|
1113
|
-
var
|
|
1113
|
+
var import_design_system10 = require("@uniformdev/design-system");
|
|
1114
1114
|
var import_react21 = __toESM(require("react"));
|
|
1115
1115
|
var import_react_use3 = require("react-use");
|
|
1116
1116
|
|
|
1117
1117
|
// src/components/EntrySearch/DefaultSearchRow.tsx
|
|
1118
1118
|
var import_react9 = require("@emotion/react");
|
|
1119
|
+
var import_design_system4 = require("@uniformdev/design-system");
|
|
1119
1120
|
var import_react10 = require("react");
|
|
1120
1121
|
|
|
1121
1122
|
// src/components/EntrySearch/styles/DefaultSearchRow.styles.ts
|
|
@@ -1162,20 +1163,9 @@ var searchRowBtn = import_react8.css`
|
|
|
1162
1163
|
// src/components/EntrySearch/DefaultSearchRow.tsx
|
|
1163
1164
|
var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
|
|
1164
1165
|
var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
|
|
1165
|
-
const buttonRef = (0, import_react10.useRef)(null);
|
|
1166
1166
|
const popoverRef = (0, import_react10.useRef)(null);
|
|
1167
1167
|
const [showInfo, setShowInfo] = (0, import_react10.useState)(false);
|
|
1168
|
-
(0,
|
|
1169
|
-
function handleClickOutside(event) {
|
|
1170
|
-
if (buttonRef.current && !buttonRef.current.contains(event.target) && popoverRef.current && !popoverRef.current.contains(event.target)) {
|
|
1171
|
-
setShowInfo(false);
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
1175
|
-
return () => {
|
|
1176
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
1177
|
-
};
|
|
1178
|
-
}, [popoverRef]);
|
|
1168
|
+
(0, import_design_system4.useOutsideClick)(popoverRef, () => setShowInfo(false));
|
|
1179
1169
|
const click = (event) => {
|
|
1180
1170
|
event.stopPropagation();
|
|
1181
1171
|
setShowInfo(!showInfo);
|
|
@@ -1194,12 +1184,11 @@ var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
|
|
|
1194
1184
|
onClick: () => triggerSelection(),
|
|
1195
1185
|
children: [
|
|
1196
1186
|
result.title,
|
|
1197
|
-
result.popoverData && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1187
|
+
result.popoverData && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: popoverRef, children: [
|
|
1198
1188
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1199
1189
|
"button",
|
|
1200
1190
|
{
|
|
1201
1191
|
type: "button",
|
|
1202
|
-
ref: buttonRef,
|
|
1203
1192
|
css: searchRowBtn,
|
|
1204
1193
|
"aria-controls": "path-details",
|
|
1205
1194
|
onClick: (e) => click(e),
|
|
@@ -1212,7 +1201,6 @@ var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
|
|
|
1212
1201
|
{
|
|
1213
1202
|
id: "path-details",
|
|
1214
1203
|
"aria-hidden": !showInfo,
|
|
1215
|
-
ref: popoverRef,
|
|
1216
1204
|
css: [
|
|
1217
1205
|
searchRowPopover,
|
|
1218
1206
|
showInfo ? import_react9.css`
|
|
@@ -1248,7 +1236,7 @@ var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
|
|
|
1248
1236
|
|
|
1249
1237
|
// src/components/EntrySearch/DefaultSelectedItem.tsx
|
|
1250
1238
|
var import_react12 = require("@emotion/react");
|
|
1251
|
-
var
|
|
1239
|
+
var import_design_system6 = require("@uniformdev/design-system");
|
|
1252
1240
|
var import_react13 = require("react");
|
|
1253
1241
|
var import_cg2 = require("react-icons/cg");
|
|
1254
1242
|
var import_timeago = require("timeago.js");
|
|
@@ -1266,7 +1254,7 @@ function openWindowWithCloseCallback(href, callback) {
|
|
|
1266
1254
|
|
|
1267
1255
|
// src/components/EntrySearch/styles/DefaultSelectedItem.styles.ts
|
|
1268
1256
|
var import_react11 = require("@emotion/react");
|
|
1269
|
-
var
|
|
1257
|
+
var import_design_system5 = require("@uniformdev/design-system");
|
|
1270
1258
|
var selectedItemContainer = import_react11.css`
|
|
1271
1259
|
border: 1px solid var(--gray-200);
|
|
1272
1260
|
background: var(--gray-50);
|
|
@@ -1307,8 +1295,9 @@ var selectItemPopover = import_react11.css`
|
|
|
1307
1295
|
border-radius: var(--rounded-base);
|
|
1308
1296
|
border-left: 4px solid var(--brand-secondary-3);
|
|
1309
1297
|
box-shadow: var(--shadow-base);
|
|
1310
|
-
position:
|
|
1311
|
-
|
|
1298
|
+
position: absolute;
|
|
1299
|
+
top: var(--spacing-base);
|
|
1300
|
+
right: var(--spacing-xl);
|
|
1312
1301
|
z-index: var(--z-10);
|
|
1313
1302
|
width: max-content;
|
|
1314
1303
|
`;
|
|
@@ -1324,7 +1313,7 @@ var selectItemLinkContainer = import_react11.css`
|
|
|
1324
1313
|
flex-direction: column;
|
|
1325
1314
|
gap: var(--spacing-sm);
|
|
1326
1315
|
|
|
1327
|
-
${(0,
|
|
1316
|
+
${(0, import_design_system5.mq)("md")} {
|
|
1328
1317
|
flex-direction: row;
|
|
1329
1318
|
min-width: 200px;
|
|
1330
1319
|
justify-content: end;
|
|
@@ -1356,37 +1345,18 @@ var DefaultSelectedItem = ({
|
|
|
1356
1345
|
onEditClosed
|
|
1357
1346
|
}) => {
|
|
1358
1347
|
var _a;
|
|
1359
|
-
const buttonRef = (0, import_react13.useRef)(null);
|
|
1360
1348
|
const popoverRef = (0, import_react13.useRef)(null);
|
|
1361
1349
|
const [showInfo, setShowInfo] = (0, import_react13.useState)(false);
|
|
1350
|
+
(0, import_design_system6.useOutsideClick)(popoverRef, () => setShowInfo(false));
|
|
1362
1351
|
(0, import_react13.useEffect)(() => {
|
|
1363
|
-
const eventHandler = (event) => {
|
|
1364
|
-
if (buttonRef.current && !buttonRef.current.contains(event.target) && popoverRef.current && !popoverRef.current.contains(event.target)) {
|
|
1365
|
-
setShowInfo(false);
|
|
1366
|
-
}
|
|
1367
|
-
};
|
|
1368
1352
|
const resizeHandler = () => {
|
|
1369
1353
|
setShowInfo(false);
|
|
1370
1354
|
};
|
|
1371
1355
|
window.addEventListener("resize", resizeHandler, true);
|
|
1372
|
-
document.addEventListener("scroll", eventHandler, true);
|
|
1373
|
-
document.addEventListener("mousedown", eventHandler);
|
|
1374
1356
|
return () => {
|
|
1375
1357
|
window.removeEventListener("resize", resizeHandler, true);
|
|
1376
|
-
document.removeEventListener("scroll", eventHandler, true);
|
|
1377
|
-
document.removeEventListener("mousedown", eventHandler);
|
|
1378
1358
|
};
|
|
1379
1359
|
}, [popoverRef]);
|
|
1380
|
-
const popoverClick = () => {
|
|
1381
|
-
var _a2;
|
|
1382
|
-
setShowInfo(!showInfo);
|
|
1383
|
-
if (popoverRef.current && buttonRef.current) {
|
|
1384
|
-
const buttonPos = (_a2 = buttonRef == null ? void 0 : buttonRef.current) == null ? void 0 : _a2.getBoundingClientRect();
|
|
1385
|
-
const popoverWidth = popoverRef.current.offsetWidth;
|
|
1386
|
-
popoverRef.current.style["top"] = `${buttonPos.top + 30}px`;
|
|
1387
|
-
popoverRef.current.style["left"] = `${buttonPos.left - popoverWidth + 30}px`;
|
|
1388
|
-
}
|
|
1389
|
-
};
|
|
1390
1360
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { css: selectedItemContainer, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { css: selectedItemInner, children: [
|
|
1391
1361
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { css: selectedItemDetails, children: [
|
|
1392
1362
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { css: selectedItemCopy, children: [
|
|
@@ -1404,20 +1374,19 @@ var DefaultSelectedItem = ({
|
|
|
1404
1374
|
children: selectedItem.title || selectedItem.id || ""
|
|
1405
1375
|
}
|
|
1406
1376
|
),
|
|
1407
|
-
selectedItem.popoverData ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1377
|
+
selectedItem.popoverData ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { ref: popoverRef, children: [
|
|
1408
1378
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1409
1379
|
"button",
|
|
1410
1380
|
{
|
|
1411
1381
|
type: "button",
|
|
1412
|
-
ref: buttonRef,
|
|
1413
1382
|
css: import_react12.css`
|
|
1414
1383
|
margin: calc(var(--spacing-xs) * -1) 0 calc(var(--spacing-xs) * -1) var(--spacing-sm);
|
|
1415
1384
|
`,
|
|
1416
1385
|
"aria-controls": "path-details",
|
|
1417
1386
|
"aria-expanded": showInfo,
|
|
1418
|
-
onClick:
|
|
1387
|
+
onClick: () => setShowInfo(!showInfo),
|
|
1419
1388
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1420
|
-
|
|
1389
|
+
import_design_system6.Icon,
|
|
1421
1390
|
{
|
|
1422
1391
|
icon: import_cg2.CgInfo,
|
|
1423
1392
|
iconColor: "gray",
|
|
@@ -1434,7 +1403,6 @@ var DefaultSelectedItem = ({
|
|
|
1434
1403
|
{
|
|
1435
1404
|
id: "path-details",
|
|
1436
1405
|
"aria-hidden": !showInfo,
|
|
1437
|
-
ref: popoverRef,
|
|
1438
1406
|
css: [
|
|
1439
1407
|
selectItemPopover,
|
|
1440
1408
|
showInfo ? import_react12.css`
|
|
@@ -1543,7 +1511,7 @@ var DefaultSelectedItem = ({
|
|
|
1543
1511
|
css: selectItemLinkBtn,
|
|
1544
1512
|
children: [
|
|
1545
1513
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { css: selectItemSmallText, children: "Unlink" }),
|
|
1546
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_design_system6.Icon, { icon: import_cg2.CgClose, iconColor: "red", size: 16 })
|
|
1547
1515
|
]
|
|
1548
1516
|
}
|
|
1549
1517
|
)
|
|
@@ -1553,7 +1521,7 @@ var DefaultSelectedItem = ({
|
|
|
1553
1521
|
|
|
1554
1522
|
// src/components/EntrySearch/EntrySearch.tsx
|
|
1555
1523
|
var import_react16 = require("@emotion/react");
|
|
1556
|
-
var
|
|
1524
|
+
var import_design_system7 = require("@uniformdev/design-system");
|
|
1557
1525
|
var React5 = __toESM(require("react"));
|
|
1558
1526
|
var import_react_beautiful_dnd = require("react-beautiful-dnd");
|
|
1559
1527
|
var import_react_use2 = require("react-use");
|
|
@@ -1713,7 +1681,7 @@ var DefaultNoResults = ({ searchText, selectedContentType }) => {
|
|
|
1713
1681
|
if (searchText) {
|
|
1714
1682
|
message = `${message} for keyword '${searchText}'.`;
|
|
1715
1683
|
}
|
|
1716
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_design_system7.Callout, { type: "info", children: message });
|
|
1717
1685
|
};
|
|
1718
1686
|
var EntrySearch = ({
|
|
1719
1687
|
search,
|
|
@@ -1916,7 +1884,7 @@ var EntrySearch = ({
|
|
|
1916
1884
|
`,
|
|
1917
1885
|
children: [
|
|
1918
1886
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1919
|
-
|
|
1887
|
+
import_design_system7.InputSelect,
|
|
1920
1888
|
{
|
|
1921
1889
|
onChange: (e) => setContentTypeSelected(e.target.value),
|
|
1922
1890
|
value: contentTypeSelected,
|
|
@@ -1940,7 +1908,7 @@ var EntrySearch = ({
|
|
|
1940
1908
|
flex-grow: 1;
|
|
1941
1909
|
`,
|
|
1942
1910
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1943
|
-
|
|
1911
|
+
import_design_system7.InputKeywordSearch,
|
|
1944
1912
|
{
|
|
1945
1913
|
inputFieldName: "searchText",
|
|
1946
1914
|
placeholder: "Enter keyword to narrow your results",
|
|
@@ -1957,13 +1925,13 @@ var EntrySearch = ({
|
|
|
1957
1925
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1958
1926
|
"div",
|
|
1959
1927
|
{
|
|
1960
|
-
css: [entrySearchResultList,
|
|
1928
|
+
css: [entrySearchResultList, import_design_system7.scrollbarStyles],
|
|
1961
1929
|
id: listBoxId.current,
|
|
1962
1930
|
role: "listbox",
|
|
1963
1931
|
tabIndex: 0,
|
|
1964
1932
|
"data-test-id": "entry-list",
|
|
1965
1933
|
children: [
|
|
1966
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_design_system7.LoadingOverlay, { isActive: showLoadingOverlay }),
|
|
1967
1935
|
Array.isArray(results) && results.length > 0 ? results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1968
1936
|
ResolvedRowComponent,
|
|
1969
1937
|
{
|
|
@@ -1979,7 +1947,7 @@ var EntrySearch = ({
|
|
|
1979
1947
|
selectedContentType: (_b = (_a = contentTypes == null ? void 0 : contentTypes.find((t) => t.id === contentTypeSelected)) == null ? void 0 : _a.name) != null ? _b : contentTypeSelected
|
|
1980
1948
|
}
|
|
1981
1949
|
),
|
|
1982
|
-
!resultsLoading && typeof totalResults !== "undefined" && results && (results == null ? void 0 : results.length) < totalResults && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { type: "button", css: entrySearchLoadMoreBtn, onClick: handleLoadMoreClick, children: !loadingMore ? "Load More" : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1950
|
+
!resultsLoading && typeof totalResults !== "undefined" && results && (results == null ? void 0 : results.length) < totalResults && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { type: "button", css: entrySearchLoadMoreBtn, onClick: handleLoadMoreClick, children: !loadingMore ? "Load More" : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_design_system7.LoadingIndicator, {}) })
|
|
1983
1951
|
]
|
|
1984
1952
|
}
|
|
1985
1953
|
),
|
|
@@ -1992,12 +1960,12 @@ var EntrySearch = ({
|
|
|
1992
1960
|
`,
|
|
1993
1961
|
children: [
|
|
1994
1962
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: onAddNew && ((_c = contentTypes == null ? void 0 : contentTypes.length) != null ? _c : 0) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1995
|
-
|
|
1963
|
+
import_design_system7.Menu,
|
|
1996
1964
|
{
|
|
1997
1965
|
menuLabel: "Add new menu",
|
|
1998
|
-
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1966
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_design_system7.Button, { buttonType: "secondary", children: "Add New" }),
|
|
1999
1967
|
children: contentTypes == null ? void 0 : contentTypes.map((ct) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2000
|
-
|
|
1968
|
+
import_design_system7.MenuItem,
|
|
2001
1969
|
{
|
|
2002
1970
|
css: import_react16.css`
|
|
2003
1971
|
background: var(--white);
|
|
@@ -2018,9 +1986,9 @@ var EntrySearch = ({
|
|
|
2018
1986
|
gap: var(--spacing-base);
|
|
2019
1987
|
`,
|
|
2020
1988
|
children: [
|
|
2021
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1989
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_design_system7.Button, { buttonType: "unimportant", onClick: handleCancelClick, children: "Cancel" }),
|
|
2022
1990
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2023
|
-
|
|
1991
|
+
import_design_system7.Button,
|
|
2024
1992
|
{
|
|
2025
1993
|
disabled: !selectedListItems.length,
|
|
2026
1994
|
onClick: handleAcceptClick,
|
|
@@ -2214,12 +2182,12 @@ function ProductSearchRow({
|
|
|
2214
2182
|
|
|
2215
2183
|
// src/components/commerce/ProductSelectedItem.tsx
|
|
2216
2184
|
var import_react20 = require("@emotion/react");
|
|
2217
|
-
var
|
|
2185
|
+
var import_design_system9 = require("@uniformdev/design-system");
|
|
2218
2186
|
var import_cg3 = require("react-icons/cg");
|
|
2219
2187
|
|
|
2220
2188
|
// src/components/commerce/styles/ProductSelectedItem.styles.ts
|
|
2221
2189
|
var import_react19 = require("@emotion/react");
|
|
2222
|
-
var
|
|
2190
|
+
var import_design_system8 = require("@uniformdev/design-system");
|
|
2223
2191
|
var productSelectedItemContainer = import_react19.css`
|
|
2224
2192
|
border: 1px solid var(--gray-200);
|
|
2225
2193
|
border-radius: var(--rounded-base);
|
|
@@ -2242,7 +2210,7 @@ var productSelectedItemContent = import_react19.css`
|
|
|
2242
2210
|
gap: var(--spacing-sm);
|
|
2243
2211
|
flex-grow: 1;
|
|
2244
2212
|
|
|
2245
|
-
${(0,
|
|
2213
|
+
${(0, import_design_system8.mq)("lg")} {
|
|
2246
2214
|
width: 50%;
|
|
2247
2215
|
margin-bottom: 0;
|
|
2248
2216
|
}
|
|
@@ -2282,7 +2250,7 @@ var productSelectedItemLinkContainer = import_react19.css`
|
|
|
2282
2250
|
flex-direction: column;
|
|
2283
2251
|
gap: var(--spacing-sm);
|
|
2284
2252
|
|
|
2285
|
-
${(0,
|
|
2253
|
+
${(0, import_design_system8.mq)("md")} {
|
|
2286
2254
|
flex-direction: row;
|
|
2287
2255
|
min-width: 200px;
|
|
2288
2256
|
justify-content: end;
|
|
@@ -2347,7 +2315,7 @@ function ProductSelectedItem({
|
|
|
2347
2315
|
css: import_react20.css`
|
|
2348
2316
|
font-size: var(--fs-sm);
|
|
2349
2317
|
|
|
2350
|
-
${(0,
|
|
2318
|
+
${(0, import_design_system9.mq)("sm")} {
|
|
2351
2319
|
display: flex;
|
|
2352
2320
|
gap: var(--spacing-base);
|
|
2353
2321
|
}
|
|
@@ -2409,7 +2377,7 @@ function ProductSelectedItem({
|
|
|
2409
2377
|
css: productedSelectedItemLinkBtn,
|
|
2410
2378
|
children: [
|
|
2411
2379
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { css: productedSelectedItemSmallText, children: "Unlink" }),
|
|
2412
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2380
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_design_system9.Icon, { icon: import_cg3.CgClose, iconColor: "red", size: 16 })
|
|
2413
2381
|
]
|
|
2414
2382
|
}
|
|
2415
2383
|
)
|
|
@@ -2482,7 +2450,7 @@ function ProductSearch({
|
|
|
2482
2450
|
await setSelectedProducts(items);
|
|
2483
2451
|
};
|
|
2484
2452
|
if (categoriesError || handleSearchState.error) {
|
|
2485
|
-
const ErrorComp = errorComponent ? errorComponent : ({ categoriesError: categoriesError2, searchError }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2453
|
+
const ErrorComp = errorComponent ? errorComponent : ({ categoriesError: categoriesError2, searchError }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_design_system10.Callout, { type: "error", children: [
|
|
2486
2454
|
"There was an error: ",
|
|
2487
2455
|
(categoriesError2 == null ? void 0 : categoriesError2.message) || (searchError == null ? void 0 : searchError.message)
|
|
2488
2456
|
] });
|
|
@@ -2523,14 +2491,14 @@ var useProductSearchContext = () => {
|
|
|
2523
2491
|
|
|
2524
2492
|
// src/components/dam/DamSelectedItem.tsx
|
|
2525
2493
|
var import_react23 = require("@emotion/react");
|
|
2526
|
-
var
|
|
2494
|
+
var import_design_system12 = require("@uniformdev/design-system");
|
|
2527
2495
|
var import_react24 = require("react");
|
|
2528
2496
|
var import_cg4 = require("react-icons/cg");
|
|
2529
2497
|
var import_timeago2 = require("timeago.js");
|
|
2530
2498
|
|
|
2531
2499
|
// src/components/dam/DamSelectedItem.styles.ts
|
|
2532
2500
|
var import_react22 = require("@emotion/react");
|
|
2533
|
-
var
|
|
2501
|
+
var import_design_system11 = require("@uniformdev/design-system");
|
|
2534
2502
|
var damSelectedItemContainer = import_react22.css`
|
|
2535
2503
|
border: 1px solid var(--gray-200);
|
|
2536
2504
|
background: var(--gray-50);
|
|
@@ -2572,8 +2540,9 @@ var damSelectedItemPopover = import_react22.css`
|
|
|
2572
2540
|
border-radius: var(--rounded-base);
|
|
2573
2541
|
border-left: 4px solid var(--brand-secondary-3);
|
|
2574
2542
|
box-shadow: var(--shadow-base);
|
|
2575
|
-
position:
|
|
2576
|
-
|
|
2543
|
+
position: absolute;
|
|
2544
|
+
top: var(--spacing-base);
|
|
2545
|
+
right: var(--spacing-xl);
|
|
2577
2546
|
z-index: var(--z-10);
|
|
2578
2547
|
width: max-content;
|
|
2579
2548
|
`;
|
|
@@ -2589,7 +2558,7 @@ var damSelectedItemLinkContainer = import_react22.css`
|
|
|
2589
2558
|
flex-direction: column;
|
|
2590
2559
|
gap: var(--spacing-sm);
|
|
2591
2560
|
|
|
2592
|
-
${(0,
|
|
2561
|
+
${(0, import_design_system11.mq)("md")} {
|
|
2593
2562
|
flex-direction: row;
|
|
2594
2563
|
justify-content: end;
|
|
2595
2564
|
min-width: 200px;
|
|
@@ -2638,35 +2607,17 @@ function DamSelectedItem({
|
|
|
2638
2607
|
logoIcon,
|
|
2639
2608
|
itemDetailsRendererComponent
|
|
2640
2609
|
}) {
|
|
2641
|
-
const buttonRef = (0, import_react24.useRef)(null);
|
|
2642
2610
|
const popoverRef = (0, import_react24.useRef)(null);
|
|
2643
2611
|
const [showInfo, setShowInfo] = (0, import_react24.useState)(false);
|
|
2644
2612
|
(0, import_react24.useEffect)(() => {
|
|
2645
|
-
const eventHandler = (event) => {
|
|
2646
|
-
if (buttonRef.current && !buttonRef.current.contains(event.target) && popoverRef.current && !popoverRef.current.contains(event.target)) {
|
|
2647
|
-
setShowInfo(false);
|
|
2648
|
-
}
|
|
2649
|
-
};
|
|
2650
2613
|
const resizeHandler = () => {
|
|
2651
2614
|
setShowInfo(false);
|
|
2652
2615
|
};
|
|
2653
2616
|
window.addEventListener("resize", resizeHandler, true);
|
|
2654
|
-
document.addEventListener("scroll", eventHandler, true);
|
|
2655
|
-
document.addEventListener("mousedown", eventHandler);
|
|
2656
2617
|
return () => {
|
|
2657
2618
|
window.removeEventListener("resize", resizeHandler, true);
|
|
2658
|
-
document.removeEventListener("scroll", eventHandler, true);
|
|
2659
|
-
document.removeEventListener("mousedown", eventHandler);
|
|
2660
2619
|
};
|
|
2661
2620
|
}, [popoverRef]);
|
|
2662
|
-
const popoverClick = () => {
|
|
2663
|
-
var _a;
|
|
2664
|
-
setShowInfo(!showInfo);
|
|
2665
|
-
if (popoverRef.current && buttonRef.current) {
|
|
2666
|
-
const buttonPos = (_a = buttonRef == null ? void 0 : buttonRef.current) == null ? void 0 : _a.getBoundingClientRect();
|
|
2667
|
-
popoverRef.current.style["top"] = `${buttonPos.top + 30}px`;
|
|
2668
|
-
}
|
|
2669
|
-
};
|
|
2670
2621
|
const ResolvedItemDetailsRendererComponent = itemDetailsRendererComponent != null ? itemDetailsRendererComponent : DefaultDamItemRenderer;
|
|
2671
2622
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2672
2623
|
"div",
|
|
@@ -2689,18 +2640,17 @@ function DamSelectedItem({
|
|
|
2689
2640
|
children: selectedItem.title || selectedItem.id || ""
|
|
2690
2641
|
}
|
|
2691
2642
|
),
|
|
2692
|
-
selectedItem.popoverData ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2643
|
+
selectedItem.popoverData ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref: popoverRef, children: [
|
|
2693
2644
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2694
2645
|
"button",
|
|
2695
2646
|
{
|
|
2696
2647
|
type: "button",
|
|
2697
|
-
ref: buttonRef,
|
|
2698
2648
|
css: damSelectedItemInfoBtn,
|
|
2699
2649
|
"aria-controls": "path-details",
|
|
2700
2650
|
"aria-expanded": showInfo,
|
|
2701
|
-
onClick:
|
|
2651
|
+
onClick: () => setShowInfo(!showInfo),
|
|
2702
2652
|
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2703
|
-
|
|
2653
|
+
import_design_system12.Icon,
|
|
2704
2654
|
{
|
|
2705
2655
|
icon: import_cg4.CgInfo,
|
|
2706
2656
|
iconColor: "gray",
|
|
@@ -2717,7 +2667,6 @@ function DamSelectedItem({
|
|
|
2717
2667
|
{
|
|
2718
2668
|
id: "path-details",
|
|
2719
2669
|
"aria-hidden": !showInfo,
|
|
2720
|
-
ref: popoverRef,
|
|
2721
2670
|
css: [
|
|
2722
2671
|
damSelectedItemPopover,
|
|
2723
2672
|
showInfo ? import_react23.css`
|
|
@@ -2770,7 +2719,7 @@ function DamSelectedItem({
|
|
|
2770
2719
|
css: damSelectedItemLinkBtn,
|
|
2771
2720
|
children: [
|
|
2772
2721
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { css: damSelectedItemSmallText, children: "Unlink" }),
|
|
2773
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2722
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_design_system12.Icon, { icon: import_cg4.CgClose, iconColor: "red", size: 16 })
|
|
2774
2723
|
]
|
|
2775
2724
|
}
|
|
2776
2725
|
)
|
|
@@ -2835,7 +2784,7 @@ function DefaultDamItemRenderer({ item }) {
|
|
|
2835
2784
|
}
|
|
2836
2785
|
|
|
2837
2786
|
// src/components/DataResourceVariablesList.tsx
|
|
2838
|
-
var
|
|
2787
|
+
var import_design_system16 = require("@uniformdev/design-system");
|
|
2839
2788
|
|
|
2840
2789
|
// src/hooks/useMeshLocation.ts
|
|
2841
2790
|
var import_react27 = require("react");
|
|
@@ -2844,7 +2793,7 @@ var import_react27 = require("react");
|
|
|
2844
2793
|
var import_react26 = require("react");
|
|
2845
2794
|
|
|
2846
2795
|
// src/components/UniformMeshSdkContext.tsx
|
|
2847
|
-
var
|
|
2796
|
+
var import_design_system13 = require("@uniformdev/design-system");
|
|
2848
2797
|
var import_react25 = require("react");
|
|
2849
2798
|
var import_jsx_runtime26 = require("@emotion/react/jsx-runtime");
|
|
2850
2799
|
var UniformMeshSdkContext = (0, import_react25.createContext)(void 0);
|
|
@@ -2856,7 +2805,7 @@ var UniformMeshSdkContextProvider = ({ children }) => {
|
|
|
2856
2805
|
};
|
|
2857
2806
|
}
|
|
2858
2807
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(UniformMeshSdkContext.Provider, { value, children: [
|
|
2859
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2808
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_design_system13.Theme, {}),
|
|
2860
2809
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(UniformMeshLocationContextProvider, { children })
|
|
2861
2810
|
] });
|
|
2862
2811
|
};
|
|
@@ -3455,7 +3404,7 @@ var tagifyStyles = import_react28.css`
|
|
|
3455
3404
|
var React10 = __toESM(require("react"));
|
|
3456
3405
|
|
|
3457
3406
|
// src/components/Variables/VariableEditor.tsx
|
|
3458
|
-
var
|
|
3407
|
+
var import_design_system14 = require("@uniformdev/design-system");
|
|
3459
3408
|
var import_formik = require("formik");
|
|
3460
3409
|
var import_jsx_runtime28 = require("@emotion/react/jsx-runtime");
|
|
3461
3410
|
function VariableEditor({ variable, onSubmit, onCancel }) {
|
|
@@ -3484,7 +3433,7 @@ function VariableEditor({ variable, onSubmit, onCancel }) {
|
|
|
3484
3433
|
children: ({ getFieldProps, initialValues }) => {
|
|
3485
3434
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_formik.Form, { css: variablesFormContainer, children: [
|
|
3486
3435
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3487
|
-
|
|
3436
|
+
import_design_system14.Input,
|
|
3488
3437
|
{
|
|
3489
3438
|
...getFieldProps("name"),
|
|
3490
3439
|
label: "Name",
|
|
@@ -3493,7 +3442,7 @@ function VariableEditor({ variable, onSubmit, onCancel }) {
|
|
|
3493
3442
|
}
|
|
3494
3443
|
),
|
|
3495
3444
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3496
|
-
|
|
3445
|
+
import_design_system14.Input,
|
|
3497
3446
|
{
|
|
3498
3447
|
...getFieldProps("helpText"),
|
|
3499
3448
|
label: "Help Text",
|
|
@@ -3501,10 +3450,10 @@ function VariableEditor({ variable, onSubmit, onCancel }) {
|
|
|
3501
3450
|
autoComplete: "off"
|
|
3502
3451
|
}
|
|
3503
3452
|
),
|
|
3504
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3453
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_design_system14.Input, { ...getFieldProps("default"), label: "Default Value", autoComplete: "off" }),
|
|
3505
3454
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { css: variablesFormBtnGroup, children: [
|
|
3506
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3507
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3455
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_design_system14.Button, { type: "submit", children: "OK" }),
|
|
3456
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_design_system14.Button, { type: "button", buttonType: "ghost", onClick: onCancel, children: "Cancel" })
|
|
3508
3457
|
] })
|
|
3509
3458
|
] });
|
|
3510
3459
|
}
|
|
@@ -3675,7 +3624,7 @@ function InputVariables({
|
|
|
3675
3624
|
|
|
3676
3625
|
// src/components/Variables/VariablesList.tsx
|
|
3677
3626
|
var import_react32 = require("@emotion/react");
|
|
3678
|
-
var
|
|
3627
|
+
var import_design_system15 = require("@uniformdev/design-system");
|
|
3679
3628
|
var import_react_beautiful_dnd2 = require("react-beautiful-dnd");
|
|
3680
3629
|
|
|
3681
3630
|
// src/components/Variables/styles/VariablesList.styles.ts
|
|
@@ -3765,13 +3714,13 @@ function VariablesList() {
|
|
|
3765
3714
|
}
|
|
3766
3715
|
};
|
|
3767
3716
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
3768
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_beautiful_dnd2.DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_beautiful_dnd2.Droppable, { droppableId: "variables-table", children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3769
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3770
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3771
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3772
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3717
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_beautiful_dnd2.DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_beautiful_dnd2.Droppable, { droppableId: "variables-table", children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_design_system15.Table, { ...provided.droppableProps, ref: provided.innerRef, children: [
|
|
3718
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_design_system15.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_design_system15.TableRow, { children: [
|
|
3719
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_design_system15.TableCellHead, { children: "Name" }),
|
|
3720
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_design_system15.TableCellHead, { children: "Default Value" }),
|
|
3721
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_design_system15.TableCellHead, {})
|
|
3773
3722
|
] }) }),
|
|
3774
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3723
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_design_system15.TableBody, { children: [
|
|
3775
3724
|
sorted.map(({ name, displayName, default: defaultValue }, index) => {
|
|
3776
3725
|
const text = displayName != null ? displayName : name;
|
|
3777
3726
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -3781,7 +3730,7 @@ function VariablesList() {
|
|
|
3781
3730
|
index,
|
|
3782
3731
|
isDragDisabled: sorted.length === 1,
|
|
3783
3732
|
children: (provided2, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3784
|
-
|
|
3733
|
+
import_design_system15.TableRow,
|
|
3785
3734
|
{
|
|
3786
3735
|
ref: provided2.innerRef,
|
|
3787
3736
|
...provided2.dragHandleProps,
|
|
@@ -3790,7 +3739,7 @@ function VariablesList() {
|
|
|
3790
3739
|
css: tableRow(snapshot.isDragging),
|
|
3791
3740
|
"data-dragging": snapshot.isDragging,
|
|
3792
3741
|
children: [
|
|
3793
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3742
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_design_system15.TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3794
3743
|
"button",
|
|
3795
3744
|
{
|
|
3796
3745
|
css: variableName,
|
|
@@ -3803,21 +3752,21 @@ function VariablesList() {
|
|
|
3803
3752
|
children: text
|
|
3804
3753
|
}
|
|
3805
3754
|
) }),
|
|
3806
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3807
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_design_system15.TableCellData, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { css: variableValue, title: defaultValue, children: defaultValue }) }),
|
|
3756
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_design_system15.TableCellData, { align: "right", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3808
3757
|
"button",
|
|
3809
3758
|
{
|
|
3810
3759
|
type: "button",
|
|
3811
3760
|
title: `delete ${text}`,
|
|
3812
3761
|
css: [
|
|
3813
|
-
|
|
3762
|
+
import_design_system15.button,
|
|
3814
3763
|
import_react32.css`
|
|
3815
3764
|
background: transparent;
|
|
3816
3765
|
`
|
|
3817
3766
|
],
|
|
3818
3767
|
"aria-controls": text,
|
|
3819
3768
|
onClick: () => dispatch({ type: "remove", variable: name }),
|
|
3820
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3769
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_design_system15.Icon, { icon: "trash", iconColor: "red" })
|
|
3821
3770
|
}
|
|
3822
3771
|
) })
|
|
3823
3772
|
]
|
|
@@ -3831,7 +3780,7 @@ function VariablesList() {
|
|
|
3831
3780
|
] })
|
|
3832
3781
|
] }) }) }),
|
|
3833
3782
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3834
|
-
|
|
3783
|
+
import_design_system15.AddListButton,
|
|
3835
3784
|
{
|
|
3836
3785
|
onButtonClick: () => dispatch({ type: "edit", variable: "" }),
|
|
3837
3786
|
"aria-label": "Add variable",
|
|
@@ -3859,7 +3808,7 @@ function DataResourceVariablesList({
|
|
|
3859
3808
|
if (NoVariablesComponent) {
|
|
3860
3809
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(NoVariablesComponent, {});
|
|
3861
3810
|
}
|
|
3862
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_design_system16.Callout, { type: "note", children: "No settings are required." });
|
|
3863
3812
|
}
|
|
3864
3813
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: variableDefinitions.map((variableDefinition) => {
|
|
3865
3814
|
var _a, _b, _c;
|
|
@@ -3888,7 +3837,7 @@ function DataResourceVariablesList({
|
|
|
3888
3837
|
function TextVariableRenderer({ definition, value, setValue }) {
|
|
3889
3838
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
3890
3839
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3891
|
-
|
|
3840
|
+
import_design_system16.Input,
|
|
3892
3841
|
{
|
|
3893
3842
|
label: definition.displayName || definition.name,
|
|
3894
3843
|
value,
|
|
@@ -3908,7 +3857,7 @@ function TextVariableRenderer({ definition, value, setValue }) {
|
|
|
3908
3857
|
// src/components/Request/RequestBody.tsx
|
|
3909
3858
|
var import_react34 = require("@emotion/react");
|
|
3910
3859
|
var import_react35 = __toESM(require("@monaco-editor/react"));
|
|
3911
|
-
var
|
|
3860
|
+
var import_design_system17 = require("@uniformdev/design-system");
|
|
3912
3861
|
var import_react36 = require("react");
|
|
3913
3862
|
|
|
3914
3863
|
// src/components/Request/RequestProvider.tsx
|
|
@@ -4051,7 +4000,7 @@ function RequestBody() {
|
|
|
4051
4000
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
4052
4001
|
`,
|
|
4053
4002
|
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4054
|
-
|
|
4003
|
+
import_design_system17.InputSelect,
|
|
4055
4004
|
{
|
|
4056
4005
|
label: "Language",
|
|
4057
4006
|
showLabel: false,
|
|
@@ -4097,34 +4046,34 @@ function RequestBody() {
|
|
|
4097
4046
|
}
|
|
4098
4047
|
|
|
4099
4048
|
// src/components/Request/RequestHeaders.tsx
|
|
4100
|
-
var
|
|
4049
|
+
var import_design_system18 = require("@uniformdev/design-system");
|
|
4101
4050
|
var import_jsx_runtime36 = require("@emotion/react/jsx-runtime");
|
|
4102
4051
|
function RequestHeaders({ disableVariables }) {
|
|
4103
4052
|
var _a, _b;
|
|
4104
4053
|
const { dispatch, request } = useRequest();
|
|
4105
4054
|
const deezHeaders = [...request.headers, { key: "", value: "" }];
|
|
4106
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4107
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4108
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4109
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_design_system18.Table, { children: [
|
|
4056
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_design_system18.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_design_system18.TableRow, { children: [
|
|
4057
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_design_system18.TableCellHead, { children: "Name" }),
|
|
4058
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_design_system18.TableCellHead, { children: "Value" })
|
|
4110
4059
|
] }) }),
|
|
4111
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4060
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_design_system18.TableBody, { children: [
|
|
4112
4061
|
(_b = (_a = request.baseRequest) == null ? void 0 : _a.headers) == null ? void 0 : _b.map((baseHeader) => {
|
|
4113
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4114
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_design_system18.TableRow, { children: [
|
|
4063
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_design_system18.TableCellData, { width: "50%", children: [
|
|
4115
4064
|
baseHeader.key,
|
|
4116
4065
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("br", {}),
|
|
4117
4066
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("small", { children: "from data source" }) })
|
|
4118
4067
|
] }),
|
|
4119
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4068
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_design_system18.TableCellData, { width: "50%", children: [
|
|
4120
4069
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("i", { css: { color: "var(--gray-500)" }, children: baseHeader.value }),
|
|
4121
|
-
request.headers.find((p) => p.key === baseHeader.key) ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4070
|
+
request.headers.find((p) => p.key === baseHeader.key) ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_design_system18.WarningMessage, { message: "overridden below" }) : null
|
|
4122
4071
|
] })
|
|
4123
4072
|
] }, baseHeader.key);
|
|
4124
4073
|
}),
|
|
4125
|
-
deezHeaders.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4126
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4127
|
-
|
|
4074
|
+
deezHeaders.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_design_system18.TableRow, { children: [
|
|
4075
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_design_system18.TableCellData, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4076
|
+
import_design_system18.Input,
|
|
4128
4077
|
{
|
|
4129
4078
|
label: header.key,
|
|
4130
4079
|
value: header.key,
|
|
@@ -4143,8 +4092,8 @@ function RequestHeaders({ disableVariables }) {
|
|
|
4143
4092
|
"data-test-id": "header-key"
|
|
4144
4093
|
}
|
|
4145
4094
|
) }),
|
|
4146
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4147
|
-
|
|
4095
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_design_system18.TableCellData, { width: "50%", children: header.key ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4096
|
+
import_design_system18.Input,
|
|
4148
4097
|
{
|
|
4149
4098
|
showLabel: false,
|
|
4150
4099
|
label: header.value,
|
|
@@ -4163,13 +4112,13 @@ function RequestHeaders({ disableVariables }) {
|
|
|
4163
4112
|
}
|
|
4164
4113
|
|
|
4165
4114
|
// src/components/Request/RequestMethodSelect.tsx
|
|
4166
|
-
var
|
|
4115
|
+
var import_design_system19 = require("@uniformdev/design-system");
|
|
4167
4116
|
var import_jsx_runtime37 = require("@emotion/react/jsx-runtime");
|
|
4168
4117
|
function RequestMethodSelect(props) {
|
|
4169
4118
|
var _a;
|
|
4170
4119
|
const { request, dispatch } = useRequest();
|
|
4171
4120
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4172
|
-
|
|
4121
|
+
import_design_system19.InputSelect,
|
|
4173
4122
|
{
|
|
4174
4123
|
...props,
|
|
4175
4124
|
options: [
|
|
@@ -4184,34 +4133,34 @@ function RequestMethodSelect(props) {
|
|
|
4184
4133
|
}
|
|
4185
4134
|
|
|
4186
4135
|
// src/components/Request/RequestParameters.tsx
|
|
4187
|
-
var
|
|
4136
|
+
var import_design_system20 = require("@uniformdev/design-system");
|
|
4188
4137
|
var import_jsx_runtime38 = require("@emotion/react/jsx-runtime");
|
|
4189
4138
|
function RequestParameters({ disableVariables }) {
|
|
4190
4139
|
var _a, _b;
|
|
4191
4140
|
const { dispatch, request } = useRequest();
|
|
4192
4141
|
const deezParameters = [...request.parameters, { key: "", value: "" }];
|
|
4193
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
4194
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4195
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4196
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_design_system20.Table, { children: [
|
|
4143
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_design_system20.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_design_system20.TableRow, { children: [
|
|
4144
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_design_system20.TableCellHead, { children: "Name" }),
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_design_system20.TableCellHead, { children: "Value" })
|
|
4197
4146
|
] }) }),
|
|
4198
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_design_system20.TableBody, { children: [
|
|
4199
4148
|
(_b = (_a = request.baseRequest) == null ? void 0 : _a.parameters) == null ? void 0 : _b.map((baseParameter) => {
|
|
4200
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
4201
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
4149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_design_system20.TableRow, { children: [
|
|
4150
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_design_system20.TableCellData, { width: "50%", children: [
|
|
4202
4151
|
baseParameter.key,
|
|
4203
4152
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("br", {}),
|
|
4204
4153
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("small", { children: "from data source" }) })
|
|
4205
4154
|
] }),
|
|
4206
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
4155
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_design_system20.TableCellData, { width: "50%", children: [
|
|
4207
4156
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("i", { css: { color: "var(--gray-500)" }, children: baseParameter.value }),
|
|
4208
|
-
request.parameters.find((p) => p.key === baseParameter.key) ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4157
|
+
request.parameters.find((p) => p.key === baseParameter.key) ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_design_system20.WarningMessage, { message: "overridden below" }) : null
|
|
4209
4158
|
] })
|
|
4210
4159
|
] }, baseParameter.key);
|
|
4211
4160
|
}),
|
|
4212
|
-
deezParameters.map((parameter, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
4213
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4214
|
-
|
|
4161
|
+
deezParameters.map((parameter, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_design_system20.TableRow, { children: [
|
|
4162
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_design_system20.TableCellData, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4163
|
+
import_design_system20.Input,
|
|
4215
4164
|
{
|
|
4216
4165
|
label: parameter.key,
|
|
4217
4166
|
value: parameter.key,
|
|
@@ -4230,8 +4179,8 @@ function RequestParameters({ disableVariables }) {
|
|
|
4230
4179
|
"data-test-id": "parameter-key"
|
|
4231
4180
|
}
|
|
4232
4181
|
) }),
|
|
4233
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4234
|
-
|
|
4182
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_design_system20.TableCellData, { width: "50%", children: parameter.key ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4183
|
+
import_design_system20.Input,
|
|
4235
4184
|
{
|
|
4236
4185
|
showLabel: false,
|
|
4237
4186
|
label: parameter.value,
|
|
@@ -4494,7 +4443,7 @@ function convertRequestDataToDataType(dataType, requestData) {
|
|
|
4494
4443
|
}
|
|
4495
4444
|
|
|
4496
4445
|
// src/components/MeshApp.tsx
|
|
4497
|
-
var
|
|
4446
|
+
var import_design_system21 = require("@uniformdev/design-system");
|
|
4498
4447
|
|
|
4499
4448
|
// src/hooks/useInitializeUniformMeshSdk.ts
|
|
4500
4449
|
var import_mesh_sdk = require("@uniformdev/mesh-sdk");
|
|
@@ -4540,7 +4489,7 @@ var MeshApp = ({
|
|
|
4540
4489
|
const { initializing, error, sdk } = useInitializeUniformMeshSdk();
|
|
4541
4490
|
if (initializing || !sdk) {
|
|
4542
4491
|
const LoadingComponent = loadingComponent;
|
|
4543
|
-
return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4492
|
+
return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system21.LoadingIndicator, {});
|
|
4544
4493
|
}
|
|
4545
4494
|
if (error) {
|
|
4546
4495
|
const ErrorComponent = errorComponent;
|
|
@@ -4550,7 +4499,7 @@ var MeshApp = ({
|
|
|
4550
4499
|
throw error;
|
|
4551
4500
|
}
|
|
4552
4501
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
|
|
4553
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4502
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system21.Theme, {}),
|
|
4554
4503
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(UniformMeshLocationContextProvider, { children })
|
|
4555
4504
|
] });
|
|
4556
4505
|
};
|
|
@@ -4570,7 +4519,7 @@ function createLocationValidator(setValue, validate) {
|
|
|
4570
4519
|
}
|
|
4571
4520
|
|
|
4572
4521
|
// src/index.ts
|
|
4573
|
-
var
|
|
4522
|
+
var import_design_system22 = require("@uniformdev/design-system");
|
|
4574
4523
|
__reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
|
|
4575
4524
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4576
4525
|
0 && (module.exports = {
|