@uniformdev/mesh-sdk-react 19.79.0 → 19.79.1-alpha.13
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.d.mts +64 -27
- package/dist/index.d.ts +64 -27
- package/dist/index.esm.js +641 -556
- package/dist/index.js +1008 -922
- package/dist/index.mjs +641 -556
- package/package.json +10 -10
package/dist/index.mjs
CHANGED
|
@@ -988,7 +988,7 @@ var searchRowPopover = css6`
|
|
|
988
988
|
border-left: 4px solid var(--brand-secondary-3);
|
|
989
989
|
border-radius: var(--rounded-base);
|
|
990
990
|
box-shadow: var(--shadow-base);
|
|
991
|
-
color: var(--
|
|
991
|
+
color: var(--typography-base);
|
|
992
992
|
padding: var(--spacing-base);
|
|
993
993
|
position: absolute;
|
|
994
994
|
top: var(--spacing-base);
|
|
@@ -1122,7 +1122,7 @@ var selectedItemCopy = css8`
|
|
|
1122
1122
|
position: relative;
|
|
1123
1123
|
`;
|
|
1124
1124
|
var selectedItemTitle = css8`
|
|
1125
|
-
color: var(--
|
|
1125
|
+
color: var(--typography-base);
|
|
1126
1126
|
font-size: var(--fs-base);
|
|
1127
1127
|
font-weight: var(--fw-bold);
|
|
1128
1128
|
line-height: 1;
|
|
@@ -1375,8 +1375,8 @@ import {
|
|
|
1375
1375
|
scrollbarStyles as scrollbarStyles2
|
|
1376
1376
|
} from "@uniformdev/design-system";
|
|
1377
1377
|
import * as React5 from "react";
|
|
1378
|
-
import {
|
|
1379
|
-
import { useDebounce as
|
|
1378
|
+
import { Draggable, Droppable } from "react-beautiful-dnd";
|
|
1379
|
+
import { useDebounce as useDebounce3 } from "react-use";
|
|
1380
1380
|
import { v4 } from "uuid";
|
|
1381
1381
|
|
|
1382
1382
|
// src/hooks/useLoadingDelay.ts
|
|
@@ -1412,6 +1412,23 @@ function useLoadingDelay(loading, { delay = 500, minDuration = 200 } = {
|
|
|
1412
1412
|
return state === "DISPLAY" || state === "EXPIRE";
|
|
1413
1413
|
}
|
|
1414
1414
|
|
|
1415
|
+
// src/components/DragDropContext.tsx
|
|
1416
|
+
import { useState as useState4 } from "react";
|
|
1417
|
+
import { DragDropContext as BaseDragDropContext } from "react-beautiful-dnd";
|
|
1418
|
+
import { useDebounce as useDebounce2 } from "react-use";
|
|
1419
|
+
import { jsx as jsx21 } from "@emotion/react/jsx-runtime";
|
|
1420
|
+
function DragDropContext({ children, ...props }) {
|
|
1421
|
+
const [isReady, setIsReady] = useState4(false);
|
|
1422
|
+
useDebounce2(
|
|
1423
|
+
() => {
|
|
1424
|
+
setIsReady(true);
|
|
1425
|
+
},
|
|
1426
|
+
300,
|
|
1427
|
+
[]
|
|
1428
|
+
);
|
|
1429
|
+
return /* @__PURE__ */ jsx21(BaseDragDropContext, { ...props, children: isReady ? children : null });
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1415
1432
|
// src/components/legacy/EntrySearch/styles/EntrySearch.styles.ts
|
|
1416
1433
|
import { css as css10 } from "@emotion/react";
|
|
1417
1434
|
var entrySearchWrapper = css10`
|
|
@@ -1431,7 +1448,7 @@ var entrySearchBtn = css10`
|
|
|
1431
1448
|
border: 0;
|
|
1432
1449
|
`;
|
|
1433
1450
|
var entrySearchLoadMoreBtn = css10`
|
|
1434
|
-
color: var(--
|
|
1451
|
+
color: var(--typography-base);
|
|
1435
1452
|
display: block;
|
|
1436
1453
|
font-weight: var(--fw-bold);
|
|
1437
1454
|
font-size: var(--fs-sm);
|
|
@@ -1480,7 +1497,7 @@ var entrySearchSelectIcon = css10`
|
|
|
1480
1497
|
padding-right: var(--spacing-sm);
|
|
1481
1498
|
`;
|
|
1482
1499
|
var entrySearchSelectImg = css10`
|
|
1483
|
-
color: var(--
|
|
1500
|
+
color: var(--typography-base);
|
|
1484
1501
|
width: 1.25rem;
|
|
1485
1502
|
height: 1.25rem;
|
|
1486
1503
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -1488,7 +1505,7 @@ var entrySearchSelectImg = css10`
|
|
|
1488
1505
|
`;
|
|
1489
1506
|
var entrySearchSelectOption = css10`
|
|
1490
1507
|
background: var(--white);
|
|
1491
|
-
color: var(--
|
|
1508
|
+
color: var(--typography-base);
|
|
1492
1509
|
`;
|
|
1493
1510
|
var draggableContainer = css10`
|
|
1494
1511
|
position: relative;
|
|
@@ -1512,7 +1529,7 @@ var draggableIconWrapper = css10`
|
|
|
1512
1529
|
opacity: 0;
|
|
1513
1530
|
`;
|
|
1514
1531
|
var draggableIcon = css10`
|
|
1515
|
-
color: var(--
|
|
1532
|
+
color: var(--typography-base);
|
|
1516
1533
|
`;
|
|
1517
1534
|
var draggableIconOffset = css10`
|
|
1518
1535
|
position: absolute;
|
|
@@ -1524,7 +1541,7 @@ var badgeIcon = css10`
|
|
|
1524
1541
|
`;
|
|
1525
1542
|
|
|
1526
1543
|
// src/components/legacy/EntrySearch/EntrySearch.tsx
|
|
1527
|
-
import { Fragment as Fragment3, jsx as
|
|
1544
|
+
import { Fragment as Fragment3, jsx as jsx22, jsxs as jsxs10 } from "@emotion/react/jsx-runtime";
|
|
1528
1545
|
var DefaultNoResults = ({ searchText, selectedContentType }) => {
|
|
1529
1546
|
let message = "No content found";
|
|
1530
1547
|
if (selectedContentType && selectedContentType !== "any") {
|
|
@@ -1533,7 +1550,7 @@ var DefaultNoResults = ({ searchText, selectedContentType }) => {
|
|
|
1533
1550
|
if (searchText) {
|
|
1534
1551
|
message = `${message} for keyword '${searchText}'.`;
|
|
1535
1552
|
}
|
|
1536
|
-
return /* @__PURE__ */
|
|
1553
|
+
return /* @__PURE__ */ jsx22(Callout, { type: "info", children: message });
|
|
1537
1554
|
};
|
|
1538
1555
|
var EntrySearch = ({
|
|
1539
1556
|
search,
|
|
@@ -1577,7 +1594,7 @@ var EntrySearch = ({
|
|
|
1577
1594
|
const [selectedListItems, setSelectedListItems] = React5.useState([]);
|
|
1578
1595
|
const [loadingMore, setLoadingMore] = React5.useState(false);
|
|
1579
1596
|
const listBoxId = React5.useRef(`x${v4()}`);
|
|
1580
|
-
|
|
1597
|
+
useDebounce3(
|
|
1581
1598
|
() => {
|
|
1582
1599
|
search(textInput, {
|
|
1583
1600
|
count: pageSize,
|
|
@@ -1656,7 +1673,7 @@ var EntrySearch = ({
|
|
|
1656
1673
|
const ResolvedSelectedItemComponent = selectedItemComponent || DefaultSelectedItem;
|
|
1657
1674
|
const ResolvedNoResultsComponent = noResultsComponent || DefaultNoResults;
|
|
1658
1675
|
const CompIcon = logoIcon && typeof logoIcon !== "string" ? logoIcon : null;
|
|
1659
|
-
const resolvedIcon = CompIcon ? /* @__PURE__ */
|
|
1676
|
+
const resolvedIcon = CompIcon ? /* @__PURE__ */ jsx22(CompIcon, { css: badgeIcon }) : /* @__PURE__ */ jsx22("img", { src: logoIcon, alt: "Logo", css: badgeIcon });
|
|
1660
1677
|
const onDragEnd = (res) => {
|
|
1661
1678
|
var _a2, _b2;
|
|
1662
1679
|
if (res.destination && res.source.droppableId === ((_a2 = res.destination) == null ? void 0 : _a2.droppableId)) {
|
|
@@ -1670,7 +1687,7 @@ var EntrySearch = ({
|
|
|
1670
1687
|
return result;
|
|
1671
1688
|
}
|
|
1672
1689
|
};
|
|
1673
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ jsx22(
|
|
1674
1691
|
"div",
|
|
1675
1692
|
{
|
|
1676
1693
|
css: css11`
|
|
@@ -1685,7 +1702,7 @@ var EntrySearch = ({
|
|
|
1685
1702
|
`,
|
|
1686
1703
|
children: [
|
|
1687
1704
|
showSearchBox ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
1688
|
-
/* @__PURE__ */
|
|
1705
|
+
/* @__PURE__ */ jsx22("div", { css: entrySearchWrapper, "data-testid": "component-search", children: /* @__PURE__ */ jsxs10(
|
|
1689
1706
|
"button",
|
|
1690
1707
|
{
|
|
1691
1708
|
css: entrySearchBtn,
|
|
@@ -1696,7 +1713,7 @@ var EntrySearch = ({
|
|
|
1696
1713
|
"aria-controls": `entry-search-config-${listBoxId.current}`,
|
|
1697
1714
|
children: [
|
|
1698
1715
|
resolvedIcon,
|
|
1699
|
-
/* @__PURE__ */
|
|
1716
|
+
/* @__PURE__ */ jsx22(
|
|
1700
1717
|
"span",
|
|
1701
1718
|
{
|
|
1702
1719
|
css: css11`
|
|
@@ -1705,7 +1722,7 @@ var EntrySearch = ({
|
|
|
1705
1722
|
children: "Select"
|
|
1706
1723
|
}
|
|
1707
1724
|
),
|
|
1708
|
-
/* @__PURE__ */
|
|
1725
|
+
/* @__PURE__ */ jsx22("span", { css: entrySearchSelectIcon, children: /* @__PURE__ */ jsx22(
|
|
1709
1726
|
ChevronDown_default,
|
|
1710
1727
|
{
|
|
1711
1728
|
css: [
|
|
@@ -1736,7 +1753,7 @@ var EntrySearch = ({
|
|
|
1736
1753
|
margin-bottom: var(--spacing-base);
|
|
1737
1754
|
`,
|
|
1738
1755
|
children: [
|
|
1739
|
-
/* @__PURE__ */
|
|
1756
|
+
/* @__PURE__ */ jsx22(
|
|
1740
1757
|
InputSelect3,
|
|
1741
1758
|
{
|
|
1742
1759
|
onChange: (e) => setContentTypeSelected(e.target.value),
|
|
@@ -1754,13 +1771,13 @@ var EntrySearch = ({
|
|
|
1754
1771
|
]
|
|
1755
1772
|
}
|
|
1756
1773
|
),
|
|
1757
|
-
/* @__PURE__ */
|
|
1774
|
+
/* @__PURE__ */ jsx22(
|
|
1758
1775
|
"div",
|
|
1759
1776
|
{
|
|
1760
1777
|
css: css11`
|
|
1761
1778
|
flex-grow: 1;
|
|
1762
1779
|
`,
|
|
1763
|
-
children: /* @__PURE__ */
|
|
1780
|
+
children: /* @__PURE__ */ jsx22(
|
|
1764
1781
|
InputKeywordSearch,
|
|
1765
1782
|
{
|
|
1766
1783
|
inputFieldName: "searchText",
|
|
@@ -1784,8 +1801,8 @@ var EntrySearch = ({
|
|
|
1784
1801
|
tabIndex: 0,
|
|
1785
1802
|
"data-testid": "entry-list",
|
|
1786
1803
|
children: [
|
|
1787
|
-
/* @__PURE__ */
|
|
1788
|
-
Array.isArray(results) && results.length > 0 ? results.map((result) => /* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ jsx22(LoadingOverlay, { isActive: showLoadingOverlay }),
|
|
1805
|
+
Array.isArray(results) && results.length > 0 ? results.map((result) => /* @__PURE__ */ jsx22(
|
|
1789
1806
|
ResolvedRowComponent,
|
|
1790
1807
|
{
|
|
1791
1808
|
isSelected: selectedListItems.some((item) => item.id === result.id),
|
|
@@ -1793,14 +1810,14 @@ var EntrySearch = ({
|
|
|
1793
1810
|
triggerSelection: () => handleListItemSelect(result)
|
|
1794
1811
|
},
|
|
1795
1812
|
result.id
|
|
1796
|
-
)) : resultsLoading ? null : /* @__PURE__ */
|
|
1813
|
+
)) : resultsLoading ? null : /* @__PURE__ */ jsx22(
|
|
1797
1814
|
ResolvedNoResultsComponent,
|
|
1798
1815
|
{
|
|
1799
1816
|
searchText: textInput || textInput,
|
|
1800
1817
|
selectedContentType: (_b = (_a = contentTypes == null ? void 0 : contentTypes.find((t) => t.id === contentTypeSelected)) == null ? void 0 : _a.name) != null ? _b : contentTypeSelected
|
|
1801
1818
|
}
|
|
1802
1819
|
),
|
|
1803
|
-
!resultsLoading && typeof totalResults !== "undefined" && results && (results == null ? void 0 : results.length) < totalResults && /* @__PURE__ */
|
|
1820
|
+
!resultsLoading && typeof totalResults !== "undefined" && results && (results == null ? void 0 : results.length) < totalResults && /* @__PURE__ */ jsx22("button", { type: "button", css: entrySearchLoadMoreBtn, onClick: handleLoadMoreClick, children: !loadingMore ? "Load More" : /* @__PURE__ */ jsx22(LoadingIndicator, {}) })
|
|
1804
1821
|
]
|
|
1805
1822
|
}
|
|
1806
1823
|
),
|
|
@@ -1812,17 +1829,17 @@ var EntrySearch = ({
|
|
|
1812
1829
|
justify-content: space-between;
|
|
1813
1830
|
`,
|
|
1814
1831
|
children: [
|
|
1815
|
-
/* @__PURE__ */
|
|
1832
|
+
/* @__PURE__ */ jsx22("div", { children: onAddNew && ((_c = contentTypes == null ? void 0 : contentTypes.length) != null ? _c : 0) > 0 ? /* @__PURE__ */ jsx22(
|
|
1816
1833
|
Menu,
|
|
1817
1834
|
{
|
|
1818
1835
|
menuLabel: "Add new menu",
|
|
1819
|
-
menuTrigger: /* @__PURE__ */
|
|
1820
|
-
children: contentTypes == null ? void 0 : contentTypes.map((ct) => /* @__PURE__ */
|
|
1836
|
+
menuTrigger: /* @__PURE__ */ jsx22(Button, { buttonType: "secondary", children: "Add New" }),
|
|
1837
|
+
children: contentTypes == null ? void 0 : contentTypes.map((ct) => /* @__PURE__ */ jsx22(
|
|
1821
1838
|
MenuItem,
|
|
1822
1839
|
{
|
|
1823
1840
|
css: css11`
|
|
1824
1841
|
background: var(--white);
|
|
1825
|
-
color: var(--
|
|
1842
|
+
color: var(--typography-base);
|
|
1826
1843
|
`,
|
|
1827
1844
|
onClick: () => onAddNew(ct),
|
|
1828
1845
|
children: ct.name
|
|
@@ -1839,8 +1856,8 @@ var EntrySearch = ({
|
|
|
1839
1856
|
gap: var(--spacing-base);
|
|
1840
1857
|
`,
|
|
1841
1858
|
children: [
|
|
1842
|
-
/* @__PURE__ */
|
|
1843
|
-
/* @__PURE__ */
|
|
1859
|
+
/* @__PURE__ */ jsx22(Button, { buttonType: "unimportant", onClick: handleCancelClick, children: "Cancel" }),
|
|
1860
|
+
/* @__PURE__ */ jsx22(
|
|
1844
1861
|
Button,
|
|
1845
1862
|
{
|
|
1846
1863
|
disabled: !selectedListItems.length,
|
|
@@ -1861,7 +1878,7 @@ var EntrySearch = ({
|
|
|
1861
1878
|
] }) : null,
|
|
1862
1879
|
!listOpen ? multiSelect && selectedListItems.length > 1 ? (
|
|
1863
1880
|
//enable dnd only if selected more then 1 item
|
|
1864
|
-
/* @__PURE__ */
|
|
1881
|
+
/* @__PURE__ */ jsx22(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx22(Droppable, { droppableId: multiSelectId || "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs10(
|
|
1865
1882
|
"div",
|
|
1866
1883
|
{
|
|
1867
1884
|
...provided.droppableProps,
|
|
@@ -1872,7 +1889,7 @@ var EntrySearch = ({
|
|
|
1872
1889
|
children: [
|
|
1873
1890
|
selectedListItems == null ? void 0 : selectedListItems.map((selectedItem, index) => {
|
|
1874
1891
|
if (selectedItem == null ? void 0 : selectedItem.id) {
|
|
1875
|
-
return /* @__PURE__ */
|
|
1892
|
+
return /* @__PURE__ */ jsx22(Draggable, { draggableId: selectedItem.id, index, children: (provided2, snapshot) => {
|
|
1876
1893
|
return /* @__PURE__ */ jsxs10(
|
|
1877
1894
|
"div",
|
|
1878
1895
|
{
|
|
@@ -1883,7 +1900,7 @@ var EntrySearch = ({
|
|
|
1883
1900
|
...provided2.dragHandleProps,
|
|
1884
1901
|
children: [
|
|
1885
1902
|
/* @__PURE__ */ jsxs10("span", { css: draggableIconWrapper, children: [
|
|
1886
|
-
/* @__PURE__ */
|
|
1903
|
+
/* @__PURE__ */ jsx22(
|
|
1887
1904
|
MoreVerticalAlt_default,
|
|
1888
1905
|
{
|
|
1889
1906
|
css: [draggableIcon, draggableIconOffset],
|
|
@@ -1891,9 +1908,9 @@ var EntrySearch = ({
|
|
|
1891
1908
|
height: 24
|
|
1892
1909
|
}
|
|
1893
1910
|
),
|
|
1894
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ jsx22(MoreVerticalAlt_default, { css: draggableIcon, width: 24, height: 24 })
|
|
1895
1912
|
] }),
|
|
1896
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ jsx22(
|
|
1897
1914
|
ResolvedSelectedItemComponent,
|
|
1898
1915
|
{
|
|
1899
1916
|
logoIcon,
|
|
@@ -1913,7 +1930,7 @@ var EntrySearch = ({
|
|
|
1913
1930
|
]
|
|
1914
1931
|
}
|
|
1915
1932
|
) }) })
|
|
1916
|
-
) : selectedListItems == null ? void 0 : selectedListItems.map((selectedItem) => /* @__PURE__ */
|
|
1933
|
+
) : selectedListItems == null ? void 0 : selectedListItems.map((selectedItem) => /* @__PURE__ */ jsx22(
|
|
1917
1934
|
ResolvedSelectedItemComponent,
|
|
1918
1935
|
{
|
|
1919
1936
|
logoIcon,
|
|
@@ -1978,7 +1995,7 @@ var productSearchRowActiveIcon = css12`
|
|
|
1978
1995
|
`;
|
|
1979
1996
|
|
|
1980
1997
|
// src/components/commerce/ProductSearchRow.tsx
|
|
1981
|
-
import { jsx as
|
|
1998
|
+
import { jsx as jsx23, jsxs as jsxs11 } from "@emotion/react/jsx-runtime";
|
|
1982
1999
|
function ProductSearchRow({
|
|
1983
2000
|
result,
|
|
1984
2001
|
isSelected,
|
|
@@ -1988,7 +2005,7 @@ function ProductSearchRow({
|
|
|
1988
2005
|
const { categories, logoIcon } = useProductSearchContext();
|
|
1989
2006
|
const [category] = result.categories || [{ id: "", name: "" }];
|
|
1990
2007
|
const categoryName = typeof category === "undefined" || !categories ? void 0 : (_a = categories.find((c) => c.id === category.id)) == null ? void 0 : _a.name;
|
|
1991
|
-
return /* @__PURE__ */
|
|
2008
|
+
return /* @__PURE__ */ jsx23(
|
|
1992
2009
|
"div",
|
|
1993
2010
|
{
|
|
1994
2011
|
"data-value": result.id,
|
|
@@ -1997,7 +2014,7 @@ function ProductSearchRow({
|
|
|
1997
2014
|
onClick: () => triggerSelection(),
|
|
1998
2015
|
css: [productSearchRowContainer],
|
|
1999
2016
|
children: /* @__PURE__ */ jsxs11("div", { css: [productSearchRowContent, isSelected ? productSearchRowContentActive : void 0], children: [
|
|
2000
|
-
result.thumbnailUrl ? /* @__PURE__ */
|
|
2017
|
+
result.thumbnailUrl ? /* @__PURE__ */ jsx23(
|
|
2001
2018
|
"img",
|
|
2002
2019
|
{
|
|
2003
2020
|
src: result.thumbnailUrl,
|
|
@@ -2009,7 +2026,7 @@ function ProductSearchRow({
|
|
|
2009
2026
|
object-fit: cover;
|
|
2010
2027
|
`
|
|
2011
2028
|
}
|
|
2012
|
-
) : /* @__PURE__ */
|
|
2029
|
+
) : /* @__PURE__ */ jsx23(
|
|
2013
2030
|
Image,
|
|
2014
2031
|
{
|
|
2015
2032
|
src: logoIcon,
|
|
@@ -2022,14 +2039,14 @@ function ProductSearchRow({
|
|
|
2022
2039
|
),
|
|
2023
2040
|
/* @__PURE__ */ jsxs11("h4", { css: [productSearchRowTitle], children: [
|
|
2024
2041
|
result.title,
|
|
2025
|
-
categoryName ? /* @__PURE__ */
|
|
2042
|
+
categoryName ? /* @__PURE__ */ jsx23("span", { css: [productSearchRowCategory], children: categoryName }) : null
|
|
2026
2043
|
] }),
|
|
2027
2044
|
/* @__PURE__ */ jsxs11("p", { css: [productSearchRowDetails], children: [
|
|
2028
2045
|
"SKU: ",
|
|
2029
2046
|
result.sku || result.id,
|
|
2030
|
-
result.price !== void 0 ? /* @__PURE__ */
|
|
2047
|
+
result.price !== void 0 ? /* @__PURE__ */ jsx23("span", { children: result.price }) : null
|
|
2031
2048
|
] }),
|
|
2032
|
-
isSelected ? /* @__PURE__ */
|
|
2049
|
+
isSelected ? /* @__PURE__ */ jsx23(Checkmark_default, { css: [productSearchRowActiveIcon] }) : null
|
|
2033
2050
|
] })
|
|
2034
2051
|
},
|
|
2035
2052
|
result.id
|
|
@@ -2114,7 +2131,7 @@ var productSelectedItemLinkContainer = css14`
|
|
|
2114
2131
|
`;
|
|
2115
2132
|
|
|
2116
2133
|
// src/components/commerce/ProductSelectedItem.tsx
|
|
2117
|
-
import { jsx as
|
|
2134
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "@emotion/react/jsx-runtime";
|
|
2118
2135
|
function ProductSelectedItem({
|
|
2119
2136
|
selectedItem,
|
|
2120
2137
|
onDeselect
|
|
@@ -2123,9 +2140,9 @@ function ProductSelectedItem({
|
|
|
2123
2140
|
const { categories, logoIcon } = useProductSearchContext();
|
|
2124
2141
|
const [category] = selectedItem.categories || [{ id: "", name: "" }];
|
|
2125
2142
|
const categoryName = typeof category === "undefined" || !categories ? void 0 : (_a = categories.find((c) => c.id === category.id)) == null ? void 0 : _a.name;
|
|
2126
|
-
return /* @__PURE__ */
|
|
2143
|
+
return /* @__PURE__ */ jsx24("div", { css: [productSelectedItemContainer], children: /* @__PURE__ */ jsxs12("article", { css: [productSelectedItemDetails], children: [
|
|
2127
2144
|
/* @__PURE__ */ jsxs12("div", { css: [productSelectedItemContent], children: [
|
|
2128
|
-
selectedItem.thumbnailUrl ? /* @__PURE__ */
|
|
2145
|
+
selectedItem.thumbnailUrl ? /* @__PURE__ */ jsx24(
|
|
2129
2146
|
"img",
|
|
2130
2147
|
{
|
|
2131
2148
|
src: selectedItem.thumbnailUrl,
|
|
@@ -2133,7 +2150,7 @@ function ProductSelectedItem({
|
|
|
2133
2150
|
css: [productSelectedItemImage],
|
|
2134
2151
|
loading: "lazy"
|
|
2135
2152
|
}
|
|
2136
|
-
) : /* @__PURE__ */
|
|
2153
|
+
) : /* @__PURE__ */ jsx24("div", { css: [productSelectedItemImage] }),
|
|
2137
2154
|
/* @__PURE__ */ jsxs12(
|
|
2138
2155
|
"div",
|
|
2139
2156
|
{
|
|
@@ -2152,7 +2169,7 @@ function ProductSelectedItem({
|
|
|
2152
2169
|
`,
|
|
2153
2170
|
children: [
|
|
2154
2171
|
selectedItem.title || selectedItem.id || "",
|
|
2155
|
-
categoryName && /* @__PURE__ */
|
|
2172
|
+
categoryName && /* @__PURE__ */ jsx24(
|
|
2156
2173
|
"span",
|
|
2157
2174
|
{
|
|
2158
2175
|
css: css15`
|
|
@@ -2178,7 +2195,7 @@ function ProductSelectedItem({
|
|
|
2178
2195
|
`,
|
|
2179
2196
|
children: [
|
|
2180
2197
|
/* @__PURE__ */ jsxs12("li", { children: [
|
|
2181
|
-
/* @__PURE__ */
|
|
2198
|
+
/* @__PURE__ */ jsx24(
|
|
2182
2199
|
"span",
|
|
2183
2200
|
{
|
|
2184
2201
|
css: css15`
|
|
@@ -2190,7 +2207,7 @@ function ProductSelectedItem({
|
|
|
2190
2207
|
selectedItem.sku || selectedItem.id
|
|
2191
2208
|
] }),
|
|
2192
2209
|
selectedItem.price !== void 0 ? /* @__PURE__ */ jsxs12("li", { children: [
|
|
2193
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ jsx24(
|
|
2194
2211
|
"span",
|
|
2195
2212
|
{
|
|
2196
2213
|
css: css15`
|
|
@@ -2199,7 +2216,7 @@ function ProductSelectedItem({
|
|
|
2199
2216
|
children: "Price:"
|
|
2200
2217
|
}
|
|
2201
2218
|
),
|
|
2202
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ jsx24("span", { children: selectedItem.price })
|
|
2203
2220
|
] }) : null
|
|
2204
2221
|
]
|
|
2205
2222
|
}
|
|
@@ -2218,8 +2235,8 @@ function ProductSelectedItem({
|
|
|
2218
2235
|
target: "_blank",
|
|
2219
2236
|
css: productedSelectedItemLinkBtn,
|
|
2220
2237
|
children: [
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
/* @__PURE__ */
|
|
2238
|
+
/* @__PURE__ */ jsx24("span", { css: productedSelectedItemSmallText, children: "Edit" }),
|
|
2239
|
+
/* @__PURE__ */ jsx24(Image, { src: logoIcon, alt: "Logo", css: productSelectedItemIcon })
|
|
2223
2240
|
]
|
|
2224
2241
|
}
|
|
2225
2242
|
) : null,
|
|
@@ -2232,8 +2249,8 @@ function ProductSelectedItem({
|
|
|
2232
2249
|
},
|
|
2233
2250
|
css: productedSelectedItemLinkBtn,
|
|
2234
2251
|
children: [
|
|
2235
|
-
/* @__PURE__ */
|
|
2236
|
-
/* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ jsx24("span", { css: productedSelectedItemSmallText, children: "Unlink" }),
|
|
2253
|
+
/* @__PURE__ */ jsx24(Icon3, { icon: CgClose3, iconColor: "red", size: 16 })
|
|
2237
2254
|
]
|
|
2238
2255
|
}
|
|
2239
2256
|
)
|
|
@@ -2242,7 +2259,7 @@ function ProductSelectedItem({
|
|
|
2242
2259
|
}
|
|
2243
2260
|
|
|
2244
2261
|
// src/components/commerce/ProductSearch.tsx
|
|
2245
|
-
import { jsx as
|
|
2262
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "@emotion/react/jsx-runtime";
|
|
2246
2263
|
function ProductSearch({
|
|
2247
2264
|
selectedProducts,
|
|
2248
2265
|
setSelectedProducts,
|
|
@@ -2313,9 +2330,9 @@ function ProductSearch({
|
|
|
2313
2330
|
"There was an error: ",
|
|
2314
2331
|
(categoriesError2 == null ? void 0 : categoriesError2.message) || (searchError == null ? void 0 : searchError.message)
|
|
2315
2332
|
] });
|
|
2316
|
-
return /* @__PURE__ */
|
|
2333
|
+
return /* @__PURE__ */ jsx25(ErrorComp, { categoriesError, searchError: handleSearchState.error });
|
|
2317
2334
|
}
|
|
2318
|
-
return /* @__PURE__ */
|
|
2335
|
+
return /* @__PURE__ */ jsx25(ProductSearchContext.Provider, { value: { categories, logoIcon }, children: /* @__PURE__ */ jsx25(
|
|
2319
2336
|
EntrySearch,
|
|
2320
2337
|
{
|
|
2321
2338
|
search: handleSearch,
|
|
@@ -2353,7 +2370,7 @@ import { css as css17 } from "@emotion/react";
|
|
|
2353
2370
|
import { CgClose as CgClose4 } from "@react-icons/all-files/cg/CgClose";
|
|
2354
2371
|
import { CgInfo as CgInfo2 } from "@react-icons/all-files/cg/CgInfo";
|
|
2355
2372
|
import { Icon as Icon4 } from "@uniformdev/design-system";
|
|
2356
|
-
import { useEffect as useEffect4, useRef as useRef6, useState as
|
|
2373
|
+
import { useEffect as useEffect4, useRef as useRef6, useState as useState6 } from "react";
|
|
2357
2374
|
import { format as timeAgo2 } from "timeago.js";
|
|
2358
2375
|
|
|
2359
2376
|
// src/components/dam/DamSelectedItem.styles.ts
|
|
@@ -2384,7 +2401,7 @@ var damSelectedItemCopy = css16`
|
|
|
2384
2401
|
position: relative;
|
|
2385
2402
|
`;
|
|
2386
2403
|
var damSelectedItemTitle = css16`
|
|
2387
|
-
color: var(--
|
|
2404
|
+
color: var(--typography-base);
|
|
2388
2405
|
font-size: var(--fs-base);
|
|
2389
2406
|
font-weight: var(--fw-bold);
|
|
2390
2407
|
line-height: 1;
|
|
@@ -2459,7 +2476,7 @@ var damSelectItemImage = css16`
|
|
|
2459
2476
|
`;
|
|
2460
2477
|
|
|
2461
2478
|
// src/components/dam/DamSelectedItem.tsx
|
|
2462
|
-
import { jsx as
|
|
2479
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "@emotion/react/jsx-runtime";
|
|
2463
2480
|
function DamSelectedItem({
|
|
2464
2481
|
selectedItem,
|
|
2465
2482
|
onDeselect,
|
|
@@ -2468,7 +2485,7 @@ function DamSelectedItem({
|
|
|
2468
2485
|
itemDetailsRendererComponent
|
|
2469
2486
|
}) {
|
|
2470
2487
|
const popoverRef = useRef6(null);
|
|
2471
|
-
const [showInfo, setShowInfo] =
|
|
2488
|
+
const [showInfo, setShowInfo] = useState6(false);
|
|
2472
2489
|
useEffect4(() => {
|
|
2473
2490
|
const resizeHandler = () => {
|
|
2474
2491
|
setShowInfo(false);
|
|
@@ -2479,7 +2496,7 @@ function DamSelectedItem({
|
|
|
2479
2496
|
};
|
|
2480
2497
|
}, [popoverRef]);
|
|
2481
2498
|
const ResolvedItemDetailsRendererComponent = itemDetailsRendererComponent != null ? itemDetailsRendererComponent : DefaultDamItemRenderer;
|
|
2482
|
-
return /* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ jsx26(
|
|
2483
2500
|
"div",
|
|
2484
2501
|
{
|
|
2485
2502
|
css: [
|
|
@@ -2491,9 +2508,9 @@ function DamSelectedItem({
|
|
|
2491
2508
|
children: /* @__PURE__ */ jsxs14("div", { css: damSelectedItemInner, children: [
|
|
2492
2509
|
/* @__PURE__ */ jsxs14("div", { css: damSelectedItemDetails, children: [
|
|
2493
2510
|
/* @__PURE__ */ jsxs14("div", { css: damSelectedItemCopy, children: [
|
|
2494
|
-
/* @__PURE__ */
|
|
2511
|
+
/* @__PURE__ */ jsx26("h4", { css: [damSelectedItemTitle], title: `ID: ${selectedItem.id}`, "data-testid": "dam-selected-item", children: selectedItem.title || selectedItem.id || "" }),
|
|
2495
2512
|
selectedItem.popoverData ? /* @__PURE__ */ jsxs14("div", { ref: popoverRef, children: [
|
|
2496
|
-
/* @__PURE__ */
|
|
2513
|
+
/* @__PURE__ */ jsx26(
|
|
2497
2514
|
"button",
|
|
2498
2515
|
{
|
|
2499
2516
|
type: "button",
|
|
@@ -2501,7 +2518,7 @@ function DamSelectedItem({
|
|
|
2501
2518
|
"aria-controls": "path-details",
|
|
2502
2519
|
"aria-expanded": showInfo,
|
|
2503
2520
|
onClick: () => setShowInfo(!showInfo),
|
|
2504
|
-
children: /* @__PURE__ */
|
|
2521
|
+
children: /* @__PURE__ */ jsx26(
|
|
2505
2522
|
Icon4,
|
|
2506
2523
|
{
|
|
2507
2524
|
icon: CgInfo2,
|
|
@@ -2514,7 +2531,7 @@ function DamSelectedItem({
|
|
|
2514
2531
|
)
|
|
2515
2532
|
}
|
|
2516
2533
|
),
|
|
2517
|
-
/* @__PURE__ */
|
|
2534
|
+
/* @__PURE__ */ jsx26(
|
|
2518
2535
|
"div",
|
|
2519
2536
|
{
|
|
2520
2537
|
id: "path-details",
|
|
@@ -2538,7 +2555,7 @@ function DamSelectedItem({
|
|
|
2538
2555
|
)
|
|
2539
2556
|
] }) : null
|
|
2540
2557
|
] }),
|
|
2541
|
-
/* @__PURE__ */
|
|
2558
|
+
/* @__PURE__ */ jsx26(ResolvedItemDetailsRendererComponent, { item: selectedItem })
|
|
2542
2559
|
] }),
|
|
2543
2560
|
/* @__PURE__ */ jsxs14("div", { css: damSelectedItemLinkContainer, children: [
|
|
2544
2561
|
selectedItem.editLink ? typeof selectedItem.editLink === "string" ? /* @__PURE__ */ jsxs14(
|
|
@@ -2556,8 +2573,8 @@ function DamSelectedItem({
|
|
|
2556
2573
|
},
|
|
2557
2574
|
css: damSelectedItemLinkBtn,
|
|
2558
2575
|
children: [
|
|
2559
|
-
/* @__PURE__ */
|
|
2560
|
-
logoIcon ? /* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ jsx26("span", { css: damSelectedItemSmallText, children: "Edit" }),
|
|
2577
|
+
logoIcon ? /* @__PURE__ */ jsx26(Image, { src: logoIcon, css: damSelectedItemIcon, alt: "Logo" }) : null
|
|
2561
2578
|
]
|
|
2562
2579
|
}
|
|
2563
2580
|
) : selectedItem.editLink : null,
|
|
@@ -2570,8 +2587,8 @@ function DamSelectedItem({
|
|
|
2570
2587
|
},
|
|
2571
2588
|
css: damSelectedItemLinkBtn,
|
|
2572
2589
|
children: [
|
|
2573
|
-
/* @__PURE__ */
|
|
2574
|
-
/* @__PURE__ */
|
|
2590
|
+
/* @__PURE__ */ jsx26("span", { css: damSelectedItemSmallText, children: "Unlink" }),
|
|
2591
|
+
/* @__PURE__ */ jsx26(Icon4, { icon: CgClose4, iconColor: "red", size: 16 })
|
|
2575
2592
|
]
|
|
2576
2593
|
}
|
|
2577
2594
|
)
|
|
@@ -2585,15 +2602,15 @@ function DefaultDamItemRenderer({ item }) {
|
|
|
2585
2602
|
let preview = null;
|
|
2586
2603
|
if (item.previewUrl && typeof item.previewUrl === "string") {
|
|
2587
2604
|
if (item.type === "image") {
|
|
2588
|
-
preview = /* @__PURE__ */
|
|
2605
|
+
preview = /* @__PURE__ */ jsx26("img", { src: item.previewUrl, alt: item.id, width: "200", css: damSelectItemImage });
|
|
2589
2606
|
} else if (item.type === "video") {
|
|
2590
|
-
preview = /* @__PURE__ */
|
|
2607
|
+
preview = /* @__PURE__ */ jsx26("video", { src: item.previewUrl, title: item.id, width: "200", controls: true, css: damSelectItemImage });
|
|
2591
2608
|
}
|
|
2592
2609
|
} else if (item.previewUrl && typeof item.previewUrl !== "string") {
|
|
2593
2610
|
preview = item.previewUrl;
|
|
2594
2611
|
}
|
|
2595
2612
|
return preview || item.metadata ? /* @__PURE__ */ jsxs14("div", { css: damSelectedItemMediaContainer, children: [
|
|
2596
|
-
preview ? /* @__PURE__ */
|
|
2613
|
+
preview ? /* @__PURE__ */ jsx26("div", { children: preview }) : null,
|
|
2597
2614
|
/* @__PURE__ */ jsxs14("ul", { children: [
|
|
2598
2615
|
item.metadata ? Object.entries(item.metadata).map(([key, value]) => {
|
|
2599
2616
|
return /* @__PURE__ */ jsxs14(
|
|
@@ -2628,7 +2645,7 @@ function DefaultDamItemRenderer({ item }) {
|
|
|
2628
2645
|
);
|
|
2629
2646
|
}) : null,
|
|
2630
2647
|
item.createdDate ? /* @__PURE__ */ jsxs14("li", { css: damSelectedItemSmallText, children: [
|
|
2631
|
-
/* @__PURE__ */
|
|
2648
|
+
/* @__PURE__ */ jsx26("span", { css: damSelectedItemPopoverLabel, children: "Date:" }),
|
|
2632
2649
|
timeAgo2(item.createdDate)
|
|
2633
2650
|
] }) : null
|
|
2634
2651
|
] })
|
|
@@ -2654,13 +2671,14 @@ function useConnectedDataAsVariables(connectedData) {
|
|
|
2654
2671
|
}
|
|
2655
2672
|
|
|
2656
2673
|
// src/hooks/useDynamicInputsAsVariables.tsx
|
|
2674
|
+
import { LOCALE_DYNAMIC_INPUT_NAME } from "@uniformdev/canvas";
|
|
2657
2675
|
import { useMemo as useMemo4 } from "react";
|
|
2658
|
-
import { Fragment as Fragment4, jsx as
|
|
2676
|
+
import { Fragment as Fragment4, jsx as jsx27 } from "@emotion/react/jsx-runtime";
|
|
2659
2677
|
function useDynamicInputsAsVariables(dynamicInputs) {
|
|
2660
2678
|
return useMemo4(() => {
|
|
2661
2679
|
const result = Object.entries(dynamicInputs).reduce(
|
|
2662
2680
|
(acc, [name, input3]) => {
|
|
2663
|
-
const source = `from ${input3.type === "path" ? "URL path" : "query string"}`;
|
|
2681
|
+
const source = `from ${name === LOCALE_DYNAMIC_INPUT_NAME ? "current locale" : input3.type === "path" ? "URL path" : "query string"}`;
|
|
2664
2682
|
acc[name] = {
|
|
2665
2683
|
readOnly: true,
|
|
2666
2684
|
type: input3.type,
|
|
@@ -2673,14 +2691,14 @@ Current preview value: ${input3.value || "not provided"}`
|
|
|
2673
2691
|
if (!input3.value) {
|
|
2674
2692
|
acc[name] = {
|
|
2675
2693
|
...acc[name],
|
|
2676
|
-
helpText: /* @__PURE__ */
|
|
2694
|
+
helpText: /* @__PURE__ */ jsx27(Fragment4, { children: input3.value || /* @__PURE__ */ jsx27("em", { children: "not provided" }) }),
|
|
2677
2695
|
displayName: name
|
|
2678
2696
|
};
|
|
2679
2697
|
} else {
|
|
2680
2698
|
acc[name] = {
|
|
2681
2699
|
...acc[name],
|
|
2682
2700
|
displayName: input3.value,
|
|
2683
|
-
helpText: /* @__PURE__ */
|
|
2701
|
+
helpText: /* @__PURE__ */ jsx27(Fragment4, { children: name })
|
|
2684
2702
|
};
|
|
2685
2703
|
}
|
|
2686
2704
|
return acc;
|
|
@@ -2695,12 +2713,12 @@ Current preview value: ${input3.value || "not provided"}`
|
|
|
2695
2713
|
import { useMemo as useMemo6, useRef as useRef7 } from "react";
|
|
2696
2714
|
|
|
2697
2715
|
// src/components/UniformMeshLocationContext.tsx
|
|
2698
|
-
import { createContext as createContext2, useContext as useContext4, useMemo as useMemo5, useState as
|
|
2716
|
+
import { createContext as createContext2, useContext as useContext4, useMemo as useMemo5, useState as useState7 } from "react";
|
|
2699
2717
|
|
|
2700
2718
|
// src/components/UniformMeshSdkContext.tsx
|
|
2701
2719
|
import { Theme } from "@uniformdev/design-system";
|
|
2702
2720
|
import { createContext, useContext as useContext3 } from "react";
|
|
2703
|
-
import { jsx as
|
|
2721
|
+
import { jsx as jsx28, jsxs as jsxs15 } from "@emotion/react/jsx-runtime";
|
|
2704
2722
|
var UniformMeshSdkContext = createContext(void 0);
|
|
2705
2723
|
var useUniformMeshSdkContext = () => {
|
|
2706
2724
|
const context = useContext3(UniformMeshSdkContext);
|
|
@@ -2717,13 +2735,13 @@ function useUniformMeshSdk() {
|
|
|
2717
2735
|
}
|
|
2718
2736
|
|
|
2719
2737
|
// src/components/UniformMeshLocationContext.tsx
|
|
2720
|
-
import { jsx as
|
|
2738
|
+
import { jsx as jsx29 } from "@emotion/react/jsx-runtime";
|
|
2721
2739
|
var UniformMeshLocationContext = createContext2(void 0);
|
|
2722
2740
|
var UniformMeshLocationContextProvider = ({
|
|
2723
2741
|
children
|
|
2724
2742
|
}) => {
|
|
2725
2743
|
const sdk = useUniformMeshSdk();
|
|
2726
|
-
const [location, setLocation] =
|
|
2744
|
+
const [location, setLocation] = useState7(sdk.getCurrentLocation());
|
|
2727
2745
|
useMemo5(() => {
|
|
2728
2746
|
const valueChangeListener = (event) => {
|
|
2729
2747
|
setLocation((old) => ({ ...old, value: event.newValue }));
|
|
@@ -2738,7 +2756,7 @@ var UniformMeshLocationContextProvider = ({
|
|
|
2738
2756
|
sdk.events.off("onMetadataChanged", metaChangeListener);
|
|
2739
2757
|
};
|
|
2740
2758
|
}, [sdk]);
|
|
2741
|
-
return /* @__PURE__ */
|
|
2759
|
+
return /* @__PURE__ */ jsx29(UniformMeshLocationContext.Provider, { value: { location }, children });
|
|
2742
2760
|
};
|
|
2743
2761
|
var useUniformMeshLocationContext = () => {
|
|
2744
2762
|
const context = useContext4(UniformMeshLocationContext);
|
|
@@ -2937,13 +2955,14 @@ function prettifyBindExpression(bindExpression) {
|
|
|
2937
2955
|
// src/components/Variables/composer/VariableChip.tsx
|
|
2938
2956
|
import { MultilineChip } from "@uniformdev/design-system";
|
|
2939
2957
|
import { Fragment as Fragment5 } from "react";
|
|
2940
|
-
import { jsx as
|
|
2958
|
+
import { jsx as jsx30 } from "@emotion/react/jsx-runtime";
|
|
2941
2959
|
function VariableChip({
|
|
2942
2960
|
displayName,
|
|
2943
2961
|
referenceIsValid,
|
|
2944
2962
|
tooltip,
|
|
2945
2963
|
reference,
|
|
2946
2964
|
onClick,
|
|
2965
|
+
clickToEdit,
|
|
2947
2966
|
isFresh,
|
|
2948
2967
|
selected,
|
|
2949
2968
|
disabled
|
|
@@ -2951,8 +2970,8 @@ function VariableChip({
|
|
|
2951
2970
|
const hasClickEvent = !!onClick;
|
|
2952
2971
|
const referenceIsValidFr = isFresh ? true : referenceIsValid;
|
|
2953
2972
|
const Wrapper = referenceIsValidFr === "info" ? InfoVariableReference : referenceIsValidFr ? Fragment5 : UndefinedVariableReference;
|
|
2954
|
-
const extraTitle = !referenceIsValidFr ? `${reference} is not defined.` : hasClickEvent ? "Click to edit" : void 0;
|
|
2955
|
-
return /* @__PURE__ */
|
|
2973
|
+
const extraTitle = !referenceIsValidFr ? `${reference} is not defined.` : hasClickEvent && clickToEdit ? "Click to edit" : void 0;
|
|
2974
|
+
return /* @__PURE__ */ jsx30(
|
|
2956
2975
|
MultilineChip,
|
|
2957
2976
|
{
|
|
2958
2977
|
title: tooltip ? `${tooltip}${extraTitle ? `
|
|
@@ -2961,12 +2980,12 @@ ${extraTitle}` : ""}` : extraTitle,
|
|
|
2961
2980
|
onClick,
|
|
2962
2981
|
"aria-selected": selected ? true : void 0,
|
|
2963
2982
|
"aria-disabled": disabled,
|
|
2964
|
-
children: /* @__PURE__ */
|
|
2983
|
+
children: /* @__PURE__ */ jsx30(Wrapper, { children: displayName || reference })
|
|
2965
2984
|
}
|
|
2966
2985
|
);
|
|
2967
2986
|
}
|
|
2968
2987
|
function UndefinedVariableReference({ children }) {
|
|
2969
|
-
return /* @__PURE__ */
|
|
2988
|
+
return /* @__PURE__ */ jsx30(
|
|
2970
2989
|
"span",
|
|
2971
2990
|
{
|
|
2972
2991
|
style: {
|
|
@@ -2979,7 +2998,7 @@ function UndefinedVariableReference({ children }) {
|
|
|
2979
2998
|
);
|
|
2980
2999
|
}
|
|
2981
3000
|
function InfoVariableReference({ children }) {
|
|
2982
|
-
return /* @__PURE__ */
|
|
3001
|
+
return /* @__PURE__ */ jsx30(
|
|
2983
3002
|
"span",
|
|
2984
3003
|
{
|
|
2985
3004
|
style: {
|
|
@@ -3012,7 +3031,7 @@ import {
|
|
|
3012
3031
|
COMMAND_PRIORITY_NORMAL,
|
|
3013
3032
|
createCommand
|
|
3014
3033
|
} from "lexical";
|
|
3015
|
-
import { useCallback, useEffect as useEffect7, useMemo as useMemo8, useRef as useRef10, useState as
|
|
3034
|
+
import { useCallback, useEffect as useEffect7, useMemo as useMemo8, useRef as useRef10, useState as useState10 } from "react";
|
|
3016
3035
|
import { createPortal } from "react-dom";
|
|
3017
3036
|
|
|
3018
3037
|
// src/components/Variables/toolbox/SelectVariableMenu.styles.ts
|
|
@@ -3045,11 +3064,11 @@ var variablesTipText = css18`
|
|
|
3045
3064
|
`;
|
|
3046
3065
|
|
|
3047
3066
|
// src/components/Variables/useVariableEditor.ts
|
|
3048
|
-
import { useEffect as useEffect6, useState as
|
|
3067
|
+
import { useEffect as useEffect6, useState as useState9 } from "react";
|
|
3049
3068
|
|
|
3050
3069
|
// src/components/Variables/VariablesProvider.tsx
|
|
3051
3070
|
import mitt from "mitt";
|
|
3052
|
-
import { createContext as createContext3, useContext as useContext5, useMemo as useMemo7, useState as
|
|
3071
|
+
import { createContext as createContext3, useContext as useContext5, useMemo as useMemo7, useState as useState8 } from "react";
|
|
3053
3072
|
|
|
3054
3073
|
// src/components/Variables/VariableEditor.tsx
|
|
3055
3074
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -3067,7 +3086,7 @@ var variablesFormContainer = css19`
|
|
|
3067
3086
|
`;
|
|
3068
3087
|
|
|
3069
3088
|
// src/components/Variables/VariableEditor.tsx
|
|
3070
|
-
import { jsx as
|
|
3089
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "@emotion/react/jsx-runtime";
|
|
3071
3090
|
var schema = z.object({
|
|
3072
3091
|
name: z.string().nonempty("Name can't be empty").regex(/^[^${}]+$/, "$, {, and } are reserved characters and cannot be used in a variable name"),
|
|
3073
3092
|
default: z.string(),
|
|
@@ -3123,7 +3142,7 @@ function VariableEditor({
|
|
|
3123
3142
|
// NOTE: this is intentionally NOT a <form> because it's regularly used in a nested modal and that can make it bubble
|
|
3124
3143
|
// up a submit to its 'parent form' which is not what we want.
|
|
3125
3144
|
/* @__PURE__ */ jsxs16("div", { css: variablesFormContainer, children: [
|
|
3126
|
-
/* @__PURE__ */
|
|
3145
|
+
/* @__PURE__ */ jsx31(
|
|
3127
3146
|
Input2,
|
|
3128
3147
|
{
|
|
3129
3148
|
...nameRegister,
|
|
@@ -3137,7 +3156,7 @@ function VariableEditor({
|
|
|
3137
3156
|
}
|
|
3138
3157
|
}
|
|
3139
3158
|
),
|
|
3140
|
-
/* @__PURE__ */
|
|
3159
|
+
/* @__PURE__ */ jsx31(
|
|
3141
3160
|
Input2,
|
|
3142
3161
|
{
|
|
3143
3162
|
...register("helpText"),
|
|
@@ -3147,7 +3166,7 @@ function VariableEditor({
|
|
|
3147
3166
|
errorMessage: (_f = formState.errors.helpText) == null ? void 0 : _f.message
|
|
3148
3167
|
}
|
|
3149
3168
|
),
|
|
3150
|
-
/* @__PURE__ */
|
|
3169
|
+
/* @__PURE__ */ jsx31(
|
|
3151
3170
|
Input2,
|
|
3152
3171
|
{
|
|
3153
3172
|
...register("default"),
|
|
@@ -3156,14 +3175,14 @@ function VariableEditor({
|
|
|
3156
3175
|
errorMessage: (_g = formState.errors.default) == null ? void 0 : _g.message
|
|
3157
3176
|
}
|
|
3158
3177
|
),
|
|
3159
|
-
/* @__PURE__ */
|
|
3160
|
-
/* @__PURE__ */
|
|
3161
|
-
/* @__PURE__ */
|
|
3178
|
+
/* @__PURE__ */ jsx31(HorizontalRhythm, { justify: "space-between", children: /* @__PURE__ */ jsxs16(HorizontalRhythm, { gap: "sm", children: [
|
|
3179
|
+
/* @__PURE__ */ jsx31(Button2, { type: "button", onClick: submitHandler, children: "OK" }),
|
|
3180
|
+
/* @__PURE__ */ jsx31(Button2, { type: "button", buttonType: "ghost", onClick: () => onCancel({ disconnect: false }), children: "cancel" })
|
|
3162
3181
|
] }) }),
|
|
3163
3182
|
disableMeshTip ? null : /* @__PURE__ */ jsxs16(Callout3, { type: "tip", title: "Customized User Interfaces", children: [
|
|
3164
3183
|
"Developers can create customized user interfaces for variable editing by building a Uniform mesh integration. Get started quickly with our",
|
|
3165
3184
|
" ",
|
|
3166
|
-
/* @__PURE__ */
|
|
3185
|
+
/* @__PURE__ */ jsx31(
|
|
3167
3186
|
"a",
|
|
3168
3187
|
{
|
|
3169
3188
|
href: "https://docs.uniform.app/docs/integrations/mesh-integrations/custom-integrations",
|
|
@@ -3179,7 +3198,7 @@ function VariableEditor({
|
|
|
3179
3198
|
}
|
|
3180
3199
|
|
|
3181
3200
|
// src/components/Variables/VariablesProvider.tsx
|
|
3182
|
-
import { jsx as
|
|
3201
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "@emotion/react/jsx-runtime";
|
|
3183
3202
|
var VariablesContext = createContext3(null);
|
|
3184
3203
|
function VariablesProvider({
|
|
3185
3204
|
value,
|
|
@@ -3190,8 +3209,8 @@ function VariablesProvider({
|
|
|
3190
3209
|
children,
|
|
3191
3210
|
knownUndefinedValues = {}
|
|
3192
3211
|
}) {
|
|
3193
|
-
const [editing, setEditing] =
|
|
3194
|
-
const [editingContext, setEditingContext] =
|
|
3212
|
+
const [editing, setEditing] = useState8();
|
|
3213
|
+
const [editingContext, setEditingContext] = useState8();
|
|
3195
3214
|
const events = useMemo7(
|
|
3196
3215
|
() => mitt(),
|
|
3197
3216
|
[]
|
|
@@ -3250,7 +3269,7 @@ function VariablesProvider({
|
|
|
3250
3269
|
}, [editing, events, knownUndefinedValues, valueBasedContextValue, isLoading]);
|
|
3251
3270
|
return /* @__PURE__ */ jsxs17(VariablesContext.Provider, { value: contextValue, children: [
|
|
3252
3271
|
children,
|
|
3253
|
-
typeof editing !== "undefined" ? /* @__PURE__ */
|
|
3272
|
+
typeof editing !== "undefined" ? /* @__PURE__ */ jsx32(
|
|
3254
3273
|
Editor,
|
|
3255
3274
|
{
|
|
3256
3275
|
context: editingContext,
|
|
@@ -3309,7 +3328,7 @@ function flattenVariables(variables) {
|
|
|
3309
3328
|
// src/components/Variables/useVariableEditor.ts
|
|
3310
3329
|
function useVariableEditor() {
|
|
3311
3330
|
const { variables, events, canDispatch, dispatch, isEditing } = useVariables(true);
|
|
3312
|
-
const [isEditingBinding, setIsEditingBinding] =
|
|
3331
|
+
const [isEditingBinding, setIsEditingBinding] = useState9();
|
|
3313
3332
|
useEffect6(() => {
|
|
3314
3333
|
if (!canDispatch || !isEditingBinding) {
|
|
3315
3334
|
return;
|
|
@@ -3406,7 +3425,7 @@ function variablesToGroupedList(variables, filterFn, context) {
|
|
|
3406
3425
|
}
|
|
3407
3426
|
|
|
3408
3427
|
// src/components/Variables/composer/VariablesPlugin.tsx
|
|
3409
|
-
import { Fragment as Fragment6, jsx as
|
|
3428
|
+
import { Fragment as Fragment6, jsx as jsx33, jsxs as jsxs18 } from "@emotion/react/jsx-runtime";
|
|
3410
3429
|
var OPEN_INSERT_VARIABLE_COMMAND = createCommand("uniform:open-insert-variable");
|
|
3411
3430
|
var EDIT_VARIABLE_COMMAND = createCommand("uniform:edit-variable");
|
|
3412
3431
|
var DISCONNECT_VARIABLE_COMMAND = createCommand(
|
|
@@ -3525,7 +3544,7 @@ function VariablesPlugin({
|
|
|
3525
3544
|
[canDispatch, enableEditingVariables, readOnly]
|
|
3526
3545
|
);
|
|
3527
3546
|
const { editVariable } = useVariableEditor();
|
|
3528
|
-
const [queryString, setQueryString] =
|
|
3547
|
+
const [queryString, setQueryString] = useState10(null);
|
|
3529
3548
|
const { groupedVariables, menuOptions, onSelect } = useVariablesMenu({
|
|
3530
3549
|
showAddVariableMenuOption,
|
|
3531
3550
|
filterVariable,
|
|
@@ -3726,7 +3745,7 @@ function VariablesPlugin({
|
|
|
3726
3745
|
if (disableVariables) {
|
|
3727
3746
|
return null;
|
|
3728
3747
|
}
|
|
3729
|
-
return /* @__PURE__ */
|
|
3748
|
+
return /* @__PURE__ */ jsx33(
|
|
3730
3749
|
LexicalTypeaheadMenuPlugin,
|
|
3731
3750
|
{
|
|
3732
3751
|
onQueryChange: setQueryString,
|
|
@@ -3739,7 +3758,7 @@ function VariablesPlugin({
|
|
|
3739
3758
|
}
|
|
3740
3759
|
let currentCumulativeMenuIndex = -1;
|
|
3741
3760
|
return createPortal(
|
|
3742
|
-
/* @__PURE__ */
|
|
3761
|
+
/* @__PURE__ */ jsx33(
|
|
3743
3762
|
"div",
|
|
3744
3763
|
{
|
|
3745
3764
|
"data-auto-resize-opt-in": true,
|
|
@@ -3758,14 +3777,14 @@ function VariablesPlugin({
|
|
|
3758
3777
|
position: relative;
|
|
3759
3778
|
z-index: var(--z-50);
|
|
3760
3779
|
`,
|
|
3761
|
-
children: /* @__PURE__ */
|
|
3780
|
+
children: /* @__PURE__ */ jsx33("div", { children: filteredGroupedVariables.map((group, index) => {
|
|
3762
3781
|
var _a, _b;
|
|
3763
3782
|
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
3764
|
-
/* @__PURE__ */
|
|
3783
|
+
/* @__PURE__ */ jsx33(MenuGroup, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
|
|
3765
3784
|
var _a2;
|
|
3766
3785
|
currentCumulativeMenuIndex++;
|
|
3767
3786
|
const myCumulativeIndex = currentCumulativeMenuIndex;
|
|
3768
|
-
return /* @__PURE__ */
|
|
3787
|
+
return /* @__PURE__ */ jsx33(
|
|
3769
3788
|
MenuItemInner,
|
|
3770
3789
|
{
|
|
3771
3790
|
active: selectedIndex === myCumulativeIndex,
|
|
@@ -3778,18 +3797,18 @@ function VariablesPlugin({
|
|
|
3778
3797
|
},
|
|
3779
3798
|
css: menuItemTextGroup,
|
|
3780
3799
|
children: variable.name === ADD_VARIABLE_OPTION ? /* @__PURE__ */ jsxs18(HorizontalRhythm2, { gap: "sm", align: "center", children: [
|
|
3781
|
-
/* @__PURE__ */
|
|
3800
|
+
/* @__PURE__ */ jsx33(AiFillPlusCircle, { fill: "var(--gray-500)" }),
|
|
3782
3801
|
" ",
|
|
3783
|
-
/* @__PURE__ */
|
|
3802
|
+
/* @__PURE__ */ jsx33("span", { children: variable.displayName })
|
|
3784
3803
|
] }) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
3785
|
-
/* @__PURE__ */
|
|
3786
|
-
variable.helpText ? /* @__PURE__ */
|
|
3804
|
+
/* @__PURE__ */ jsx33("span", { children: (_a2 = variable.displayName) != null ? _a2 : variable.name }),
|
|
3805
|
+
variable.helpText ? /* @__PURE__ */ jsx33("small", { css: smallText, children: variable.helpText }) : null
|
|
3787
3806
|
] })
|
|
3788
3807
|
},
|
|
3789
3808
|
group.name + variable.name
|
|
3790
3809
|
);
|
|
3791
3810
|
}) }, (_b = group.name) != null ? _b : `none${index}`),
|
|
3792
|
-
group.name || index === filteredGroupedVariables.length - 1 ? null : /* @__PURE__ */
|
|
3811
|
+
group.name || index === filteredGroupedVariables.length - 1 ? null : /* @__PURE__ */ jsx33(MenuItemSeparator, {})
|
|
3793
3812
|
] });
|
|
3794
3813
|
}) })
|
|
3795
3814
|
}
|
|
@@ -3802,7 +3821,7 @@ function VariablesPlugin({
|
|
|
3802
3821
|
}
|
|
3803
3822
|
|
|
3804
3823
|
// src/components/Variables/composer/VariableNode.tsx
|
|
3805
|
-
import { jsx as
|
|
3824
|
+
import { jsx as jsx34 } from "@emotion/react/jsx-runtime";
|
|
3806
3825
|
var VariableNode = class _VariableNode extends DecoratorNode {
|
|
3807
3826
|
constructor(reference, state, key) {
|
|
3808
3827
|
super(key);
|
|
@@ -3867,7 +3886,7 @@ var VariableNode = class _VariableNode extends DecoratorNode {
|
|
|
3867
3886
|
* rely on Context, etc in this renderer.
|
|
3868
3887
|
*/
|
|
3869
3888
|
decorate() {
|
|
3870
|
-
return /* @__PURE__ */
|
|
3889
|
+
return /* @__PURE__ */ jsx34(VariableNodeComponent, { state: this.__state, reference: this.reference, nodeKey: this.__key });
|
|
3871
3890
|
}
|
|
3872
3891
|
};
|
|
3873
3892
|
function $createVariableNode(variableReference, state) {
|
|
@@ -3960,14 +3979,15 @@ function VariableNodeComponent({
|
|
|
3960
3979
|
)
|
|
3961
3980
|
);
|
|
3962
3981
|
}, [clearSelection, editor, isSelected, nodeKey, onDelete, setSelected]);
|
|
3963
|
-
return /* @__PURE__ */
|
|
3982
|
+
return /* @__PURE__ */ jsx34(
|
|
3964
3983
|
VariableChip,
|
|
3965
3984
|
{
|
|
3966
3985
|
...state,
|
|
3967
3986
|
reference,
|
|
3968
|
-
displayName: state.isLoading ? /* @__PURE__ */
|
|
3987
|
+
displayName: state.isLoading ? /* @__PURE__ */ jsx34(LoadingIndicator2, { size: "sm" }) : state.displayName,
|
|
3969
3988
|
selected: isSelected,
|
|
3970
3989
|
disabled: readOnly,
|
|
3990
|
+
clickToEdit: state.hasClickEvent,
|
|
3971
3991
|
onClick: state.hasClickEvent ? () => {
|
|
3972
3992
|
setSelected(!isSelected);
|
|
3973
3993
|
editor.dispatchCommand(EDIT_VARIABLE_COMMAND, {
|
|
@@ -3985,7 +4005,7 @@ function $isTargetWithinDecorator(target) {
|
|
|
3985
4005
|
|
|
3986
4006
|
// src/components/Variables/InputVariables.tsx
|
|
3987
4007
|
import { Caption, ErrorMessage, InfoMessage, WarningMessage } from "@uniformdev/design-system";
|
|
3988
|
-
import { useState as
|
|
4008
|
+
import { useState as useState13 } from "react";
|
|
3989
4009
|
import { v4 as v42 } from "uuid";
|
|
3990
4010
|
|
|
3991
4011
|
// src/components/Variables/composer/EditorRefPlugin.tsx
|
|
@@ -4047,8 +4067,8 @@ var menuBtn2 = css21`
|
|
|
4047
4067
|
var input = css21`
|
|
4048
4068
|
appearance: none;
|
|
4049
4069
|
background-color: var(--white);
|
|
4050
|
-
border: 1px solid var(--gray-
|
|
4051
|
-
border-radius: var(--rounded-
|
|
4070
|
+
border: 1px solid var(--gray-200);
|
|
4071
|
+
border-radius: var(--rounded-sm);
|
|
4052
4072
|
color: var(--gray-700);
|
|
4053
4073
|
padding-block: var(--spacing-base);
|
|
4054
4074
|
padding-left: var(--spacing-base);
|
|
@@ -4062,7 +4082,7 @@ var input = css21`
|
|
|
4062
4082
|
|
|
4063
4083
|
&:focus,
|
|
4064
4084
|
&:focus-within {
|
|
4065
|
-
border-color: var(--
|
|
4085
|
+
border-color: var(--typography-base);
|
|
4066
4086
|
box-shadow: none;
|
|
4067
4087
|
outline: none;
|
|
4068
4088
|
}
|
|
@@ -4070,7 +4090,7 @@ var input = css21`
|
|
|
4070
4090
|
&:disabled,
|
|
4071
4091
|
&:disabled::placeholder {
|
|
4072
4092
|
cursor: not-allowed;
|
|
4073
|
-
color: var(--gray-
|
|
4093
|
+
color: var(--gray-400);
|
|
4074
4094
|
border-color: var(--gray-300);
|
|
4075
4095
|
}
|
|
4076
4096
|
|
|
@@ -4083,6 +4103,10 @@ var inputCompact = css21`
|
|
|
4083
4103
|
padding-block: var(--spacing-sm);
|
|
4084
4104
|
font-size: var(--fs-sm);
|
|
4085
4105
|
`;
|
|
4106
|
+
var inputDisabled = css21`
|
|
4107
|
+
cursor: not-allowed;
|
|
4108
|
+
opacity: var(--opacity-50);
|
|
4109
|
+
`;
|
|
4086
4110
|
var placeholderCaption = css21`
|
|
4087
4111
|
position: absolute;
|
|
4088
4112
|
color: var(--gray-400);
|
|
@@ -4215,7 +4239,7 @@ import { BsFillPlusCircleFill } from "@react-icons/all-files/bs/BsFillPlusCircle
|
|
|
4215
4239
|
import { CgUsbC } from "@react-icons/all-files/cg/CgUsbC";
|
|
4216
4240
|
import { HorizontalRhythm as HorizontalRhythm3, Menu as Menu2, MenuGroup as MenuGroup2, MenuItem as MenuItem2, MenuItemSeparator as MenuItemSeparator2 } from "@uniformdev/design-system";
|
|
4217
4241
|
import { useRef as useRef11 } from "react";
|
|
4218
|
-
import { Fragment as Fragment7, jsx as
|
|
4242
|
+
import { Fragment as Fragment7, jsx as jsx35, jsxs as jsxs19 } from "@emotion/react/jsx-runtime";
|
|
4219
4243
|
function SelectVariableMenu({
|
|
4220
4244
|
onSelectVariable,
|
|
4221
4245
|
onResetVariables,
|
|
@@ -4241,7 +4265,7 @@ function SelectVariableMenu({
|
|
|
4241
4265
|
{
|
|
4242
4266
|
placement: "bottom-start",
|
|
4243
4267
|
withoutPortal: true,
|
|
4244
|
-
menuTrigger: /* @__PURE__ */
|
|
4268
|
+
menuTrigger: /* @__PURE__ */ jsx35(
|
|
4245
4269
|
"button",
|
|
4246
4270
|
{
|
|
4247
4271
|
...buttonProps,
|
|
@@ -4250,12 +4274,12 @@ function SelectVariableMenu({
|
|
|
4250
4274
|
css: [menuBtn, buttonCss],
|
|
4251
4275
|
type: "button",
|
|
4252
4276
|
"data-testid": "insert-variable",
|
|
4253
|
-
children: /* @__PURE__ */
|
|
4277
|
+
children: /* @__PURE__ */ jsx35(CgUsbC, { size: "1.4rem" })
|
|
4254
4278
|
}
|
|
4255
4279
|
),
|
|
4256
4280
|
menuLabel: menuTooltip,
|
|
4257
4281
|
children: [
|
|
4258
|
-
showAddVariableMenuOptionForReals ? /* @__PURE__ */
|
|
4282
|
+
showAddVariableMenuOptionForReals ? /* @__PURE__ */ jsx35(
|
|
4259
4283
|
MenuItem2,
|
|
4260
4284
|
{
|
|
4261
4285
|
onClick: async () => {
|
|
@@ -4267,15 +4291,15 @@ function SelectVariableMenu({
|
|
|
4267
4291
|
},
|
|
4268
4292
|
"data-testid": "add-variable-button",
|
|
4269
4293
|
children: /* @__PURE__ */ jsxs19(HorizontalRhythm3, { gap: "sm", align: "center", children: [
|
|
4270
|
-
/* @__PURE__ */
|
|
4271
|
-
/* @__PURE__ */
|
|
4294
|
+
/* @__PURE__ */ jsx35(BsFillPlusCircleFill, { fill: "var(--gray-500)", size: "1.25em" }),
|
|
4295
|
+
/* @__PURE__ */ jsx35("span", { children: typeof showAddVariableMenuOption === "string" ? showAddVariableMenuOption : /* @__PURE__ */ jsx35(Fragment7, { children: "Add\u2026" }) })
|
|
4272
4296
|
] })
|
|
4273
4297
|
}
|
|
4274
4298
|
) : null,
|
|
4275
|
-
showAddVariableMenuOptionForReals && menuHasVariableOptions ? /* @__PURE__ */
|
|
4299
|
+
showAddVariableMenuOptionForReals && menuHasVariableOptions ? /* @__PURE__ */ jsx35(MenuItemSeparator2, {}) : null,
|
|
4276
4300
|
variablesGroups.map((group) => {
|
|
4277
4301
|
var _a;
|
|
4278
|
-
return /* @__PURE__ */
|
|
4302
|
+
return /* @__PURE__ */ jsx35(MenuGroup2, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
|
|
4279
4303
|
const { name, displayName, helpText } = variable;
|
|
4280
4304
|
return /* @__PURE__ */ jsxs19(
|
|
4281
4305
|
MenuItem2,
|
|
@@ -4284,25 +4308,25 @@ function SelectVariableMenu({
|
|
|
4284
4308
|
css: menuItemTextGroup,
|
|
4285
4309
|
onClick: () => onSelectVariable == null ? void 0 : onSelectVariable(variable),
|
|
4286
4310
|
children: [
|
|
4287
|
-
/* @__PURE__ */
|
|
4288
|
-
helpText ? /* @__PURE__ */
|
|
4311
|
+
/* @__PURE__ */ jsx35("span", { children: displayName != null ? displayName : name }),
|
|
4312
|
+
helpText ? /* @__PURE__ */ jsx35("small", { css: smallText, children: helpText }) : null
|
|
4289
4313
|
]
|
|
4290
4314
|
},
|
|
4291
4315
|
name
|
|
4292
4316
|
);
|
|
4293
4317
|
}) }, group.name);
|
|
4294
4318
|
}),
|
|
4295
|
-
menuHasVariableOptions && onResetVariables ? /* @__PURE__ */
|
|
4296
|
-
onResetVariables ? /* @__PURE__ */
|
|
4297
|
-
tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */
|
|
4298
|
-
tip ? /* @__PURE__ */
|
|
4319
|
+
menuHasVariableOptions && onResetVariables ? /* @__PURE__ */ jsx35(MenuItemSeparator2, {}) : null,
|
|
4320
|
+
onResetVariables ? /* @__PURE__ */ jsx35(MenuItem2, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
|
|
4321
|
+
tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */ jsx35(MenuItemSeparator2, {}) : null,
|
|
4322
|
+
tip ? /* @__PURE__ */ jsx35("i", { css: variablesTipText, children: tip }) : null
|
|
4299
4323
|
]
|
|
4300
4324
|
}
|
|
4301
4325
|
);
|
|
4302
4326
|
}
|
|
4303
4327
|
|
|
4304
4328
|
// src/components/Variables/toolbox/VariablesComposerVariableMenu.tsx
|
|
4305
|
-
import { jsx as
|
|
4329
|
+
import { jsx as jsx36 } from "@emotion/react/jsx-runtime";
|
|
4306
4330
|
function VariablesComposerVariableMenu(props) {
|
|
4307
4331
|
const [editor] = useLexicalComposerContext6();
|
|
4308
4332
|
const onSelectVariable = (selectedVariable) => {
|
|
@@ -4318,7 +4342,7 @@ function VariablesComposerVariableMenu(props) {
|
|
|
4318
4342
|
editor.dispatchCommand(CLEAR_EDITOR_COMMAND, void 0);
|
|
4319
4343
|
(_a = props.onResetVariables) == null ? void 0 : _a.call(props);
|
|
4320
4344
|
};
|
|
4321
|
-
return /* @__PURE__ */
|
|
4345
|
+
return /* @__PURE__ */ jsx36(
|
|
4322
4346
|
SelectVariableMenu,
|
|
4323
4347
|
{
|
|
4324
4348
|
...props,
|
|
@@ -4329,7 +4353,7 @@ function VariablesComposerVariableMenu(props) {
|
|
|
4329
4353
|
}
|
|
4330
4354
|
|
|
4331
4355
|
// src/components/Variables/toolbox/VariableField.tsx
|
|
4332
|
-
import { jsx as
|
|
4356
|
+
import { jsx as jsx37, jsxs as jsxs20 } from "@emotion/react/jsx-runtime";
|
|
4333
4357
|
function VariableField({
|
|
4334
4358
|
label,
|
|
4335
4359
|
selectVariableMenuOptions,
|
|
@@ -4340,7 +4364,7 @@ function VariableField({
|
|
|
4340
4364
|
}) {
|
|
4341
4365
|
const { variables } = useVariables(true);
|
|
4342
4366
|
const varCount = Object.keys(variables).length;
|
|
4343
|
-
const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */
|
|
4367
|
+
const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */ jsx37(
|
|
4344
4368
|
VariablesComposerVariableMenu,
|
|
4345
4369
|
{
|
|
4346
4370
|
...selectVariableMenuOptions,
|
|
@@ -4348,10 +4372,10 @@ function VariableField({
|
|
|
4348
4372
|
buttonProps: isActive ? { "aria-pressed": "true" } : void 0
|
|
4349
4373
|
}
|
|
4350
4374
|
) : null;
|
|
4351
|
-
return /* @__PURE__ */ jsxs20("div", { children: [
|
|
4352
|
-
/* @__PURE__ */ jsxs20("label", { htmlFor: id, css: labelText, children: [
|
|
4375
|
+
return /* @__PURE__ */ jsxs20("div", { "data-testid": "variable-field", children: [
|
|
4376
|
+
/* @__PURE__ */ jsxs20("label", { htmlFor: id, css: labelText, "data-testid": "field-name", children: [
|
|
4353
4377
|
variableSelector,
|
|
4354
|
-
/* @__PURE__ */
|
|
4378
|
+
/* @__PURE__ */ jsx37("span", { children: label })
|
|
4355
4379
|
] }),
|
|
4356
4380
|
children
|
|
4357
4381
|
] });
|
|
@@ -4362,7 +4386,7 @@ import { AutoFocusPlugin } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
|
4362
4386
|
import { ClearEditorPlugin } from "@lexical/react/LexicalClearEditorPlugin";
|
|
4363
4387
|
import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
|
4364
4388
|
import { OnChangePlugin } from "@lexical/react/LexicalOnChangePlugin";
|
|
4365
|
-
import { useMemo as useMemo10, useRef as useRef12, useState as
|
|
4389
|
+
import { useMemo as useMemo10, useRef as useRef12, useState as useState12 } from "react";
|
|
4366
4390
|
|
|
4367
4391
|
// src/components/Variables/composer/DisablePlugin.tsx
|
|
4368
4392
|
import { useLexicalComposerContext as useLexicalComposerContext7 } from "@lexical/react/LexicalComposerContext";
|
|
@@ -4422,7 +4446,7 @@ function serializeRecursive(node, buffer) {
|
|
|
4422
4446
|
}
|
|
4423
4447
|
|
|
4424
4448
|
// src/components/Variables/toolbox/VariablesComposer.tsx
|
|
4425
|
-
import { Fragment as Fragment8, jsx as
|
|
4449
|
+
import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs21 } from "@emotion/react/jsx-runtime";
|
|
4426
4450
|
function VariablesComposer(props) {
|
|
4427
4451
|
const {
|
|
4428
4452
|
value,
|
|
@@ -4434,7 +4458,7 @@ function VariablesComposer(props) {
|
|
|
4434
4458
|
autoFocus,
|
|
4435
4459
|
...variablesPluginProps
|
|
4436
4460
|
} = props;
|
|
4437
|
-
const [lastEmittedValue, setLastEmittedValue] =
|
|
4461
|
+
const [lastEmittedValue, setLastEmittedValue] = useState12(value);
|
|
4438
4462
|
const editorConfig = useMemo10(
|
|
4439
4463
|
() => ({
|
|
4440
4464
|
namespace: "uniform",
|
|
@@ -4452,9 +4476,10 @@ function VariablesComposer(props) {
|
|
|
4452
4476
|
if (typeof document === "undefined")
|
|
4453
4477
|
return null;
|
|
4454
4478
|
return /* @__PURE__ */ jsxs21(LexicalComposer, { initialConfig: editorConfig, children: [
|
|
4455
|
-
/* @__PURE__ */
|
|
4479
|
+
/* @__PURE__ */ jsx38(
|
|
4456
4480
|
OnChangePlugin,
|
|
4457
4481
|
{
|
|
4482
|
+
ignoreSelectionChange: true,
|
|
4458
4483
|
onChange: (state) => {
|
|
4459
4484
|
editorState.current = state;
|
|
4460
4485
|
if (updateTimeout.current) {
|
|
@@ -4472,12 +4497,12 @@ function VariablesComposer(props) {
|
|
|
4472
4497
|
}
|
|
4473
4498
|
}
|
|
4474
4499
|
),
|
|
4475
|
-
/* @__PURE__ */
|
|
4476
|
-
/* @__PURE__ */
|
|
4477
|
-
/* @__PURE__ */
|
|
4478
|
-
/* @__PURE__ */
|
|
4479
|
-
/* @__PURE__ */
|
|
4480
|
-
/* @__PURE__ */
|
|
4500
|
+
/* @__PURE__ */ jsx38(Fragment8, { children: multiLine ? null : /* @__PURE__ */ jsx38(SingleLineTextPlugin, {}) }),
|
|
4501
|
+
/* @__PURE__ */ jsx38(ClearEditorPlugin, {}),
|
|
4502
|
+
/* @__PURE__ */ jsx38(VariablesPlugin, { ...variablesPluginProps }),
|
|
4503
|
+
/* @__PURE__ */ jsx38(DisablePlugin, { disabled }),
|
|
4504
|
+
/* @__PURE__ */ jsx38(Fragment8, { children: autoFocus ? /* @__PURE__ */ jsx38(AutoFocusPlugin, {}) : null }),
|
|
4505
|
+
/* @__PURE__ */ jsx38(Fragment8, { children })
|
|
4481
4506
|
] });
|
|
4482
4507
|
}
|
|
4483
4508
|
|
|
@@ -4503,23 +4528,23 @@ import {
|
|
|
4503
4528
|
PASTE_COMMAND as PASTE_COMMAND2
|
|
4504
4529
|
} from "lexical";
|
|
4505
4530
|
import { useEffect as useEffect13 } from "react";
|
|
4506
|
-
import { Fragment as Fragment9, jsx as
|
|
4531
|
+
import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
|
|
4507
4532
|
function VariablesComposerInput({
|
|
4508
4533
|
css: css37,
|
|
4509
4534
|
placeholder,
|
|
4510
4535
|
...contentEditableProps
|
|
4511
4536
|
}) {
|
|
4512
4537
|
return /* @__PURE__ */ jsxs22("div", { children: [
|
|
4513
|
-
/* @__PURE__ */
|
|
4538
|
+
/* @__PURE__ */ jsx39(
|
|
4514
4539
|
PlainTextPlugin,
|
|
4515
4540
|
{
|
|
4516
|
-
contentEditable: /* @__PURE__ */
|
|
4517
|
-
placeholder: placeholder ? /* @__PURE__ */
|
|
4541
|
+
contentEditable: /* @__PURE__ */ jsx39(ContentEditable, { ...contentEditableProps }),
|
|
4542
|
+
placeholder: placeholder ? /* @__PURE__ */ jsx39(Fragment9, { children: placeholder }) : null,
|
|
4518
4543
|
ErrorBoundary: LexicalErrorBoundary
|
|
4519
4544
|
}
|
|
4520
4545
|
),
|
|
4521
|
-
/* @__PURE__ */
|
|
4522
|
-
/* @__PURE__ */
|
|
4546
|
+
/* @__PURE__ */ jsx39(RichishCopyAndPastePlugin, {}),
|
|
4547
|
+
/* @__PURE__ */ jsx39(HistoryPlugin, {})
|
|
4523
4548
|
] });
|
|
4524
4549
|
}
|
|
4525
4550
|
function RichishCopyAndPastePlugin() {
|
|
@@ -4599,7 +4624,7 @@ function RichishCopyAndPastePlugin() {
|
|
|
4599
4624
|
}
|
|
4600
4625
|
|
|
4601
4626
|
// src/components/Variables/InputVariables.tsx
|
|
4602
|
-
import { Fragment as Fragment10, jsx as
|
|
4627
|
+
import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
|
|
4603
4628
|
function InputVariables(props) {
|
|
4604
4629
|
const {
|
|
4605
4630
|
id,
|
|
@@ -4626,7 +4651,7 @@ function InputVariables(props) {
|
|
|
4626
4651
|
filterVariable,
|
|
4627
4652
|
styleVariant = "default"
|
|
4628
4653
|
} = props;
|
|
4629
|
-
const [finalId] =
|
|
4654
|
+
const [finalId] = useState13(id != null ? id : () => v42());
|
|
4630
4655
|
const { dispatch, canDispatch, isEditing } = useVariables(true);
|
|
4631
4656
|
const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
|
|
4632
4657
|
const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
|
|
@@ -4638,15 +4663,16 @@ function InputVariables(props) {
|
|
|
4638
4663
|
dispatch({ type: "cancelEdit" });
|
|
4639
4664
|
}
|
|
4640
4665
|
},
|
|
4666
|
+
css: disabled ? inputDisabled : "",
|
|
4641
4667
|
children: [
|
|
4642
|
-
useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */
|
|
4668
|
+
useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx40(
|
|
4643
4669
|
InputVariablesOverlayMenu,
|
|
4644
4670
|
{
|
|
4645
4671
|
...sharedMenuProps,
|
|
4646
4672
|
disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
|
|
4647
4673
|
replaceValueOnVariableInsert: useInputWithNoVariables,
|
|
4648
4674
|
useInputWhenNoVariables: useInputWithNoVariables,
|
|
4649
|
-
children: /* @__PURE__ */
|
|
4675
|
+
children: /* @__PURE__ */ jsx40(
|
|
4650
4676
|
VariablesComposerInput,
|
|
4651
4677
|
{
|
|
4652
4678
|
id: finalId,
|
|
@@ -4654,7 +4680,7 @@ function InputVariables(props) {
|
|
|
4654
4680
|
"data-testid": dataTestId ? dataTestId : "input-container",
|
|
4655
4681
|
"data-text-value": value,
|
|
4656
4682
|
css: [input, styleVariant === "compact" ? inputCompact : null],
|
|
4657
|
-
placeholder: placeholder ? /* @__PURE__ */
|
|
4683
|
+
placeholder: placeholder ? /* @__PURE__ */ jsx40(
|
|
4658
4684
|
Caption,
|
|
4659
4685
|
{
|
|
4660
4686
|
css: [
|
|
@@ -4668,16 +4694,16 @@ function InputVariables(props) {
|
|
|
4668
4694
|
)
|
|
4669
4695
|
}
|
|
4670
4696
|
),
|
|
4671
|
-
caption ? /* @__PURE__ */
|
|
4672
|
-
errorMessage ? /* @__PURE__ */
|
|
4673
|
-
warningMessage ? /* @__PURE__ */
|
|
4674
|
-
infoMessage ? /* @__PURE__ */
|
|
4697
|
+
caption ? /* @__PURE__ */ jsx40(Caption, { children: caption }) : null,
|
|
4698
|
+
errorMessage ? /* @__PURE__ */ jsx40(ErrorMessage, { message: errorMessage }) : null,
|
|
4699
|
+
warningMessage ? /* @__PURE__ */ jsx40(WarningMessage, { message: warningMessage }) : null,
|
|
4700
|
+
infoMessage ? /* @__PURE__ */ jsx40(InfoMessage, { message: infoMessage }) : null
|
|
4675
4701
|
]
|
|
4676
4702
|
}
|
|
4677
4703
|
);
|
|
4678
4704
|
let body = input3;
|
|
4679
4705
|
if (label) {
|
|
4680
|
-
body = /* @__PURE__ */
|
|
4706
|
+
body = /* @__PURE__ */ jsx40(
|
|
4681
4707
|
VariableField,
|
|
4682
4708
|
{
|
|
4683
4709
|
label,
|
|
@@ -4707,9 +4733,9 @@ function InputVariables(props) {
|
|
|
4707
4733
|
autoFocus,
|
|
4708
4734
|
filterVariable,
|
|
4709
4735
|
children: [
|
|
4710
|
-
/* @__PURE__ */
|
|
4711
|
-
/* @__PURE__ */
|
|
4712
|
-
editorRef ? /* @__PURE__ */
|
|
4736
|
+
/* @__PURE__ */ jsx40(PasteTransformerPlugin, { transformPaste }),
|
|
4737
|
+
/* @__PURE__ */ jsx40(ControlledValuePlugin, { value, enabled: useInputWithNoVariables }),
|
|
4738
|
+
editorRef ? /* @__PURE__ */ jsx40(EditorRefPlugin, { editorRef }) : null,
|
|
4713
4739
|
body
|
|
4714
4740
|
]
|
|
4715
4741
|
}
|
|
@@ -4722,11 +4748,11 @@ function InputVariablesOverlayMenu({
|
|
|
4722
4748
|
...props
|
|
4723
4749
|
}) {
|
|
4724
4750
|
if (disabled) {
|
|
4725
|
-
return /* @__PURE__ */
|
|
4751
|
+
return /* @__PURE__ */ jsx40(Fragment10, { children });
|
|
4726
4752
|
}
|
|
4727
4753
|
return /* @__PURE__ */ jsxs23("div", { css: menuContainer, children: [
|
|
4728
4754
|
children,
|
|
4729
|
-
/* @__PURE__ */
|
|
4755
|
+
/* @__PURE__ */ jsx40(
|
|
4730
4756
|
VariablesComposerVariableMenu,
|
|
4731
4757
|
{
|
|
4732
4758
|
...props,
|
|
@@ -4780,7 +4806,7 @@ var input2 = css23`
|
|
|
4780
4806
|
appearance: none;
|
|
4781
4807
|
box-sizing: border-box;
|
|
4782
4808
|
background: var(--white);
|
|
4783
|
-
border: 1px solid var(--
|
|
4809
|
+
border: 1px solid var(--gray-200);
|
|
4784
4810
|
border-radius: var(--rounded-sm);
|
|
4785
4811
|
color: var(--gray-700);
|
|
4786
4812
|
font-size: var(--fs-sm);
|
|
@@ -4800,16 +4826,19 @@ var input2 = css23`
|
|
|
4800
4826
|
|
|
4801
4827
|
&:focus,
|
|
4802
4828
|
&:focus-within {
|
|
4803
|
-
border-radius: var(--rounded-
|
|
4804
|
-
box-shadow:
|
|
4805
|
-
border: 1px solid var(--
|
|
4829
|
+
border-radius: var(--rounded-sm);
|
|
4830
|
+
box-shadow: var(--elevation-100);
|
|
4831
|
+
border: 1px solid var(--accent-dark-active);
|
|
4806
4832
|
outline: none;
|
|
4807
4833
|
}
|
|
4834
|
+
&:hover {
|
|
4835
|
+
border: 1px solid var(--accent-dark-hover);
|
|
4836
|
+
}
|
|
4808
4837
|
|
|
4809
4838
|
&:disabled,
|
|
4810
4839
|
&:disabled::placeholder,
|
|
4811
4840
|
&:disabled:hover {
|
|
4812
|
-
border-radius: var(--rounded-
|
|
4841
|
+
border-radius: var(--rounded-sm);
|
|
4813
4842
|
cursor: not-allowed;
|
|
4814
4843
|
color: var(--gray-400);
|
|
4815
4844
|
}
|
|
@@ -4834,7 +4863,7 @@ var inputMultiLine = (lines) => css23`
|
|
|
4834
4863
|
`;
|
|
4835
4864
|
|
|
4836
4865
|
// src/components/Variables/ParameterConnectionIndicator.tsx
|
|
4837
|
-
import { jsx as
|
|
4866
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
|
|
4838
4867
|
function ParameterConnectionIndicator({
|
|
4839
4868
|
children,
|
|
4840
4869
|
value,
|
|
@@ -4854,20 +4883,20 @@ function ParameterConnectionIndicator({
|
|
|
4854
4883
|
return result;
|
|
4855
4884
|
}, [value]);
|
|
4856
4885
|
return /* @__PURE__ */ jsxs24(HorizontalRhythm4, { align: "center", gap: "xs", css: { width: "100%" }, children: [
|
|
4857
|
-
/* @__PURE__ */
|
|
4858
|
-
disabled ? null : /* @__PURE__ */
|
|
4886
|
+
/* @__PURE__ */ jsx41("div", { css: { flex: 1 }, children }),
|
|
4887
|
+
disabled ? null : /* @__PURE__ */ jsx41(
|
|
4859
4888
|
Menu3,
|
|
4860
4889
|
{
|
|
4861
4890
|
placement: "bottom-start",
|
|
4862
4891
|
withoutPortal: true,
|
|
4863
|
-
menuTrigger: /* @__PURE__ */
|
|
4892
|
+
menuTrigger: /* @__PURE__ */ jsx41(
|
|
4864
4893
|
"button",
|
|
4865
4894
|
{
|
|
4866
4895
|
title: menuTooltip,
|
|
4867
4896
|
"aria-pressed": hasVariablesInValue,
|
|
4868
4897
|
css: [menuBtn, variableBindButton2],
|
|
4869
4898
|
type: "button",
|
|
4870
|
-
children: /* @__PURE__ */
|
|
4899
|
+
children: /* @__PURE__ */ jsx41(CgUsbC2, { size: "1.4rem" })
|
|
4871
4900
|
}
|
|
4872
4901
|
),
|
|
4873
4902
|
menuLabel: menuTooltip,
|
|
@@ -4919,7 +4948,7 @@ function OnDisconnectPlugin({
|
|
|
4919
4948
|
}
|
|
4920
4949
|
|
|
4921
4950
|
// src/components/Variables/ParameterOrSingleVariable.tsx
|
|
4922
|
-
import { jsx as
|
|
4951
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
|
|
4923
4952
|
function ParameterOrSingleVariable(props) {
|
|
4924
4953
|
const {
|
|
4925
4954
|
value,
|
|
@@ -4961,11 +4990,11 @@ function ParameterOrSingleVariable(props) {
|
|
|
4961
4990
|
replaceValueOnVariableInsert: true,
|
|
4962
4991
|
disabled: true,
|
|
4963
4992
|
children: [
|
|
4964
|
-
/* @__PURE__ */
|
|
4965
|
-
editorRef ? /* @__PURE__ */
|
|
4966
|
-
/* @__PURE__ */
|
|
4993
|
+
/* @__PURE__ */ jsx42(OnDisconnectPlugin, { onDisconnect: handleDisconnect }),
|
|
4994
|
+
editorRef ? /* @__PURE__ */ jsx42(EditorRefPlugin, { editorRef }) : null,
|
|
4995
|
+
/* @__PURE__ */ jsx42(ControlledValuePlugin, { enabled: true, value }),
|
|
4967
4996
|
/* @__PURE__ */ jsxs25(HorizontalRhythm5, { align: "center", gap: "xs", css: { width: "100%" }, children: [
|
|
4968
|
-
/* @__PURE__ */
|
|
4997
|
+
/* @__PURE__ */ jsx42("div", { css: { flex: 1 }, children: inputWhenNoVariables && !hadVariablesInValue ? inputWhenNoVariables : /* @__PURE__ */ jsx42(
|
|
4969
4998
|
VariablesComposerInput,
|
|
4970
4999
|
{
|
|
4971
5000
|
"data-text-value": value,
|
|
@@ -4973,7 +5002,7 @@ function ParameterOrSingleVariable(props) {
|
|
|
4973
5002
|
css: input2
|
|
4974
5003
|
}
|
|
4975
5004
|
) }),
|
|
4976
|
-
disableVariablesForReals ? null : /* @__PURE__ */
|
|
5005
|
+
disableVariablesForReals ? null : /* @__PURE__ */ jsx42(
|
|
4977
5006
|
VariablesComposerVariableMenu,
|
|
4978
5007
|
{
|
|
4979
5008
|
...sharedMenuProps,
|
|
@@ -4993,7 +5022,7 @@ function ParameterOrSingleVariable(props) {
|
|
|
4993
5022
|
// src/components/Variables/ParameterVariables.tsx
|
|
4994
5023
|
import { css as css24 } from "@emotion/react";
|
|
4995
5024
|
import { HorizontalRhythm as HorizontalRhythm6 } from "@uniformdev/design-system";
|
|
4996
|
-
import { jsx as
|
|
5025
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
|
|
4997
5026
|
function ParameterVariables(props) {
|
|
4998
5027
|
const {
|
|
4999
5028
|
value,
|
|
@@ -5028,8 +5057,8 @@ function ParameterVariables(props) {
|
|
|
5028
5057
|
autoFocus,
|
|
5029
5058
|
filterVariable,
|
|
5030
5059
|
children: [
|
|
5031
|
-
editorRef ? /* @__PURE__ */
|
|
5032
|
-
/* @__PURE__ */
|
|
5060
|
+
editorRef ? /* @__PURE__ */ jsx43(EditorRefPlugin, { editorRef }) : null,
|
|
5061
|
+
/* @__PURE__ */ jsx43(ControlledValuePlugin, { value, enabled: useInputWhenNoVariables }),
|
|
5033
5062
|
/* @__PURE__ */ jsxs26(
|
|
5034
5063
|
HorizontalRhythm6,
|
|
5035
5064
|
{
|
|
@@ -5042,7 +5071,7 @@ function ParameterVariables(props) {
|
|
|
5042
5071
|
}
|
|
5043
5072
|
},
|
|
5044
5073
|
children: [
|
|
5045
|
-
/* @__PURE__ */
|
|
5074
|
+
/* @__PURE__ */ jsx43("div", { css: { flex: 1 }, children: useInputWhenNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx43(
|
|
5046
5075
|
VariablesComposerInput,
|
|
5047
5076
|
{
|
|
5048
5077
|
"aria-label": ariaLabel,
|
|
@@ -5055,7 +5084,7 @@ function ParameterVariables(props) {
|
|
|
5055
5084
|
]
|
|
5056
5085
|
}
|
|
5057
5086
|
) }),
|
|
5058
|
-
disableVariablesForReals ? null : /* @__PURE__ */
|
|
5087
|
+
disableVariablesForReals ? null : /* @__PURE__ */ jsx43(
|
|
5059
5088
|
VariablesComposerVariableMenu,
|
|
5060
5089
|
{
|
|
5061
5090
|
...sharedMenuProps,
|
|
@@ -5099,7 +5128,7 @@ import {
|
|
|
5099
5128
|
TableHead,
|
|
5100
5129
|
TableRow
|
|
5101
5130
|
} from "@uniformdev/design-system";
|
|
5102
|
-
import {
|
|
5131
|
+
import { Draggable as Draggable2, Droppable as Droppable2 } from "react-beautiful-dnd";
|
|
5103
5132
|
|
|
5104
5133
|
// src/components/Variables/styles/VariablesList.styles.ts
|
|
5105
5134
|
import { css as css25 } from "@emotion/react";
|
|
@@ -5131,7 +5160,6 @@ var tableCellDragIcon = css25`
|
|
|
5131
5160
|
`;
|
|
5132
5161
|
var variableName = css25`
|
|
5133
5162
|
border: none;
|
|
5134
|
-
color: var(--brand-secondary-5);
|
|
5135
5163
|
font-weight: var(--fw-medium);
|
|
5136
5164
|
padding: 0;
|
|
5137
5165
|
background: none;
|
|
@@ -5148,9 +5176,9 @@ var variableValue = css25`
|
|
|
5148
5176
|
`;
|
|
5149
5177
|
|
|
5150
5178
|
// src/components/Variables/VariablesList.tsx
|
|
5151
|
-
import { Fragment as Fragment11, jsx as
|
|
5179
|
+
import { Fragment as Fragment11, jsx as jsx44, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
|
|
5152
5180
|
function VariablesList() {
|
|
5153
|
-
const { variables, dispatch } = useVariables();
|
|
5181
|
+
const { variables, dispatch, readOnly } = useVariables();
|
|
5154
5182
|
const sorted = variablesToList(variables).filter((variable) => !variable.system);
|
|
5155
5183
|
const onDragEnd = (res) => {
|
|
5156
5184
|
var _a, _b;
|
|
@@ -5170,17 +5198,17 @@ function VariablesList() {
|
|
|
5170
5198
|
}
|
|
5171
5199
|
};
|
|
5172
5200
|
return /* @__PURE__ */ jsxs27(Fragment11, { children: [
|
|
5173
|
-
/* @__PURE__ */
|
|
5174
|
-
/* @__PURE__ */
|
|
5175
|
-
/* @__PURE__ */
|
|
5176
|
-
/* @__PURE__ */
|
|
5177
|
-
/* @__PURE__ */
|
|
5201
|
+
/* @__PURE__ */ jsx44(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx44(Droppable2, { droppableId: "variables-table", children: (provided) => /* @__PURE__ */ jsxs27(Table, { ...provided.droppableProps, ref: provided.innerRef, children: [
|
|
5202
|
+
/* @__PURE__ */ jsx44(TableHead, { children: /* @__PURE__ */ jsxs27(TableRow, { children: [
|
|
5203
|
+
/* @__PURE__ */ jsx44(TableCellHead, { children: "Name" }),
|
|
5204
|
+
/* @__PURE__ */ jsx44(TableCellHead, { children: "Default Value" }),
|
|
5205
|
+
/* @__PURE__ */ jsx44(TableCellHead, {})
|
|
5178
5206
|
] }) }),
|
|
5179
5207
|
/* @__PURE__ */ jsxs27(TableBody, { children: [
|
|
5180
|
-
sorted.map(({ name, displayName, default: defaultValue
|
|
5208
|
+
sorted.map(({ name, displayName, default: defaultValue }, index) => {
|
|
5181
5209
|
const text = displayName != null ? displayName : name;
|
|
5182
5210
|
const textValue = variableDefaultTextValue(defaultValue);
|
|
5183
|
-
return /* @__PURE__ */
|
|
5211
|
+
return /* @__PURE__ */ jsx44(
|
|
5184
5212
|
Draggable2,
|
|
5185
5213
|
{
|
|
5186
5214
|
draggableId: name,
|
|
@@ -5196,7 +5224,7 @@ function VariablesList() {
|
|
|
5196
5224
|
css: tableRow(snapshot.isDragging),
|
|
5197
5225
|
"data-dragging": snapshot.isDragging,
|
|
5198
5226
|
children: [
|
|
5199
|
-
/* @__PURE__ */
|
|
5227
|
+
/* @__PURE__ */ jsx44(TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: readOnly ? /* @__PURE__ */ jsx44("span", { css: variableName, children: text }) : /* @__PURE__ */ jsx44(
|
|
5200
5228
|
"button",
|
|
5201
5229
|
{
|
|
5202
5230
|
css: variableName,
|
|
@@ -5209,8 +5237,8 @@ function VariablesList() {
|
|
|
5209
5237
|
children: text
|
|
5210
5238
|
}
|
|
5211
5239
|
) }),
|
|
5212
|
-
/* @__PURE__ */
|
|
5213
|
-
/* @__PURE__ */
|
|
5240
|
+
/* @__PURE__ */ jsx44(TableCellData, { children: /* @__PURE__ */ jsx44("span", { css: variableValue, title: textValue, children: textValue }) }),
|
|
5241
|
+
/* @__PURE__ */ jsx44(TableCellData, { align: "right", children: readOnly ? null : /* @__PURE__ */ jsx44(
|
|
5214
5242
|
"button",
|
|
5215
5243
|
{
|
|
5216
5244
|
type: "button",
|
|
@@ -5223,7 +5251,7 @@ function VariablesList() {
|
|
|
5223
5251
|
],
|
|
5224
5252
|
"aria-controls": text,
|
|
5225
5253
|
onClick: () => dispatch({ type: "remove", variable: name }),
|
|
5226
|
-
children: /* @__PURE__ */
|
|
5254
|
+
children: /* @__PURE__ */ jsx44(Icon5, { icon: "trash", iconColor: "red" })
|
|
5227
5255
|
}
|
|
5228
5256
|
) })
|
|
5229
5257
|
]
|
|
@@ -5236,12 +5264,12 @@ function VariablesList() {
|
|
|
5236
5264
|
provided.placeholder
|
|
5237
5265
|
] })
|
|
5238
5266
|
] }) }) }),
|
|
5239
|
-
/* @__PURE__ */
|
|
5267
|
+
!readOnly && /* @__PURE__ */ jsx44(
|
|
5240
5268
|
AddListButton,
|
|
5241
5269
|
{
|
|
5242
5270
|
onButtonClick: () => dispatch({ type: "edit", variable: "" }),
|
|
5243
5271
|
"aria-label": "Add variable",
|
|
5244
|
-
buttonText: "
|
|
5272
|
+
buttonText: "Add variable",
|
|
5245
5273
|
icon: "math-plus",
|
|
5246
5274
|
css: { marginLeft: "var(--spacing-md)" }
|
|
5247
5275
|
}
|
|
@@ -5250,37 +5278,37 @@ function VariablesList() {
|
|
|
5250
5278
|
}
|
|
5251
5279
|
|
|
5252
5280
|
// src/components/DataResourceDynamicInputProvider.tsx
|
|
5253
|
-
import { jsx as
|
|
5281
|
+
import { jsx as jsx45 } from "@emotion/react/jsx-runtime";
|
|
5254
5282
|
function DataResourceDynamicInputProvider(props) {
|
|
5255
5283
|
const { children, dynamicInputs } = props;
|
|
5256
5284
|
if (dynamicInputs) {
|
|
5257
|
-
return /* @__PURE__ */
|
|
5285
|
+
return /* @__PURE__ */ jsx45(DataResourceDynamicInputProviderRenderer, { ...props, children });
|
|
5258
5286
|
}
|
|
5259
|
-
return /* @__PURE__ */
|
|
5287
|
+
return /* @__PURE__ */ jsx45(DataResourceDynamicInputProviderContextShim, { children });
|
|
5260
5288
|
}
|
|
5261
5289
|
function DataResourceDynamicInputProviderContextShim(props) {
|
|
5262
5290
|
const {
|
|
5263
5291
|
metadata: { dynamicInputs }
|
|
5264
5292
|
} = useMeshLocation("dataResource");
|
|
5265
|
-
return /* @__PURE__ */
|
|
5293
|
+
return /* @__PURE__ */ jsx45(DataResourceDynamicInputProviderRenderer, { ...props, dynamicInputs });
|
|
5266
5294
|
}
|
|
5267
5295
|
function DataResourceDynamicInputProviderRenderer({
|
|
5268
5296
|
children,
|
|
5269
5297
|
dynamicInputs
|
|
5270
5298
|
}) {
|
|
5271
5299
|
const variables = useDynamicInputsAsVariables(dynamicInputs);
|
|
5272
|
-
return /* @__PURE__ */
|
|
5300
|
+
return /* @__PURE__ */ jsx45(VariablesProvider, { value: variables, readOnly: true, children });
|
|
5273
5301
|
}
|
|
5274
5302
|
|
|
5275
5303
|
// src/components/DataResourceVariablesList.tsx
|
|
5276
5304
|
import { Callout as Callout4, VerticalRhythm } from "@uniformdev/design-system";
|
|
5277
|
-
import { jsx as
|
|
5305
|
+
import { jsx as jsx46 } from "@emotion/react/jsx-runtime";
|
|
5278
5306
|
function DataResourceVariablesList(props) {
|
|
5279
5307
|
const {
|
|
5280
5308
|
value,
|
|
5281
5309
|
metadata: { dataType, dynamicInputs }
|
|
5282
5310
|
} = useMeshLocation("dataResource");
|
|
5283
|
-
return /* @__PURE__ */
|
|
5311
|
+
return /* @__PURE__ */ jsx46(
|
|
5284
5312
|
DataResourceVariablesListExplicit,
|
|
5285
5313
|
{
|
|
5286
5314
|
...props,
|
|
@@ -5301,14 +5329,14 @@ function DataResourceVariablesListExplicit({
|
|
|
5301
5329
|
const variableDefinitions = variablesToList(dataType.variables);
|
|
5302
5330
|
if (variableDefinitions.length === 0) {
|
|
5303
5331
|
if (NoVariablesComponent) {
|
|
5304
|
-
return /* @__PURE__ */
|
|
5332
|
+
return /* @__PURE__ */ jsx46(NoVariablesComponent, {});
|
|
5305
5333
|
}
|
|
5306
|
-
return /* @__PURE__ */
|
|
5334
|
+
return /* @__PURE__ */ jsx46(Callout4, { type: "note", children: "No settings are required." });
|
|
5307
5335
|
}
|
|
5308
|
-
return /* @__PURE__ */
|
|
5336
|
+
return /* @__PURE__ */ jsx46(DataResourceDynamicInputProvider, { dynamicInputs, children: /* @__PURE__ */ jsx46(VerticalRhythm, { children: variableDefinitions.map((variableDefinition) => {
|
|
5309
5337
|
var _a, _b, _c;
|
|
5310
5338
|
const VariableRenderer = variableDefinition.type ? (_a = typeRenderers == null ? void 0 : typeRenderers[variableDefinition.type]) != null ? _a : TextVariableRenderer : TextVariableRenderer;
|
|
5311
|
-
return /* @__PURE__ */
|
|
5339
|
+
return /* @__PURE__ */ jsx46("div", { children: /* @__PURE__ */ jsx46(
|
|
5312
5340
|
VariableRenderer,
|
|
5313
5341
|
{
|
|
5314
5342
|
definition: variableDefinition,
|
|
@@ -5333,7 +5361,7 @@ function DataResourceVariablesListExplicit({
|
|
|
5333
5361
|
}
|
|
5334
5362
|
function TextVariableRenderer({ definition, value, setValue }) {
|
|
5335
5363
|
var _a;
|
|
5336
|
-
return /* @__PURE__ */
|
|
5364
|
+
return /* @__PURE__ */ jsx46("div", { "data-testid": "variable-input-container", children: /* @__PURE__ */ jsx46(
|
|
5337
5365
|
InputVariables,
|
|
5338
5366
|
{
|
|
5339
5367
|
label: definition.displayName || definition.name,
|
|
@@ -5348,11 +5376,11 @@ function TextVariableRenderer({ definition, value, setValue }) {
|
|
|
5348
5376
|
// src/components/Request/RequestBody.tsx
|
|
5349
5377
|
import { css as css28 } from "@emotion/react";
|
|
5350
5378
|
import { InputSelect as InputSelect4, JsonEditor } from "@uniformdev/design-system";
|
|
5351
|
-
import { useState as
|
|
5379
|
+
import { useState as useState14 } from "react";
|
|
5352
5380
|
|
|
5353
5381
|
// src/components/Request/RequestProvider.tsx
|
|
5354
5382
|
import * as React11 from "react";
|
|
5355
|
-
import { jsx as
|
|
5383
|
+
import { jsx as jsx47 } from "@emotion/react/jsx-runtime";
|
|
5356
5384
|
var RequestContext = React11.createContext(null);
|
|
5357
5385
|
function RequestProvider({ value, onChange, children }) {
|
|
5358
5386
|
const contextValue = React11.useMemo(() => {
|
|
@@ -5421,7 +5449,7 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
5421
5449
|
request: value
|
|
5422
5450
|
};
|
|
5423
5451
|
}, [onChange, value]);
|
|
5424
|
-
return /* @__PURE__ */
|
|
5452
|
+
return /* @__PURE__ */ jsx47(RequestContext.Provider, { value: contextValue, children });
|
|
5425
5453
|
}
|
|
5426
5454
|
function useRequest() {
|
|
5427
5455
|
const context = React11.useContext(RequestContext);
|
|
@@ -5445,17 +5473,17 @@ var requestTypeContainer = (bgColor) => css27`
|
|
|
5445
5473
|
`;
|
|
5446
5474
|
|
|
5447
5475
|
// src/components/Request/RequestTypeContainer.tsx
|
|
5448
|
-
import { jsx as
|
|
5476
|
+
import { jsx as jsx48 } from "@emotion/react/jsx-runtime";
|
|
5449
5477
|
var RequestTypeContainer = ({
|
|
5450
5478
|
bgColor = "transparent",
|
|
5451
5479
|
children,
|
|
5452
5480
|
...props
|
|
5453
5481
|
}) => {
|
|
5454
|
-
return /* @__PURE__ */
|
|
5482
|
+
return /* @__PURE__ */ jsx48("div", { css: requestTypeContainer(bgColor), ...props, children });
|
|
5455
5483
|
};
|
|
5456
5484
|
|
|
5457
5485
|
// src/components/Request/RequestBody.tsx
|
|
5458
|
-
import { jsx as
|
|
5486
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
|
|
5459
5487
|
var LANGUAGE_OPTIONS = [
|
|
5460
5488
|
{ label: "Text", value: "plaintext" },
|
|
5461
5489
|
{ label: "JSON", value: "json" },
|
|
@@ -5474,7 +5502,7 @@ var LANGUAGE_TO_CONTENT_TYPE = {
|
|
|
5474
5502
|
};
|
|
5475
5503
|
function RequestBody() {
|
|
5476
5504
|
const { request, dispatch } = useRequest();
|
|
5477
|
-
const [language, setLanguage] =
|
|
5505
|
+
const [language, setLanguage] = useState14("json");
|
|
5478
5506
|
return /* @__PURE__ */ jsxs28(
|
|
5479
5507
|
"div",
|
|
5480
5508
|
{
|
|
@@ -5482,14 +5510,14 @@ function RequestBody() {
|
|
|
5482
5510
|
background: var(--white);
|
|
5483
5511
|
`,
|
|
5484
5512
|
children: [
|
|
5485
|
-
/* @__PURE__ */
|
|
5513
|
+
/* @__PURE__ */ jsx49(
|
|
5486
5514
|
RequestTypeContainer,
|
|
5487
5515
|
{
|
|
5488
5516
|
bgColor: "var(--gray-100)",
|
|
5489
5517
|
css: css28`
|
|
5490
5518
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
5491
5519
|
`,
|
|
5492
|
-
children: /* @__PURE__ */
|
|
5520
|
+
children: /* @__PURE__ */ jsx49(
|
|
5493
5521
|
InputSelect4,
|
|
5494
5522
|
{
|
|
5495
5523
|
label: "Language",
|
|
@@ -5512,7 +5540,7 @@ function RequestBody() {
|
|
|
5512
5540
|
)
|
|
5513
5541
|
}
|
|
5514
5542
|
),
|
|
5515
|
-
/* @__PURE__ */
|
|
5543
|
+
/* @__PURE__ */ jsx49(
|
|
5516
5544
|
JsonEditor,
|
|
5517
5545
|
{
|
|
5518
5546
|
height: 200,
|
|
@@ -5540,7 +5568,7 @@ import {
|
|
|
5540
5568
|
TableRow as TableRow2,
|
|
5541
5569
|
WarningMessage as WarningMessage2
|
|
5542
5570
|
} from "@uniformdev/design-system";
|
|
5543
|
-
import { jsx as
|
|
5571
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
|
|
5544
5572
|
function RequestHeaders({
|
|
5545
5573
|
disableVariables,
|
|
5546
5574
|
addOmitIfEmpty
|
|
@@ -5559,29 +5587,29 @@ function RequestHeaders({
|
|
|
5559
5587
|
index
|
|
5560
5588
|
});
|
|
5561
5589
|
};
|
|
5562
|
-
return /* @__PURE__ */
|
|
5563
|
-
/* @__PURE__ */
|
|
5564
|
-
/* @__PURE__ */
|
|
5565
|
-
/* @__PURE__ */
|
|
5566
|
-
addOmitIfEmpty ? /* @__PURE__ */
|
|
5590
|
+
return /* @__PURE__ */ jsx50("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs29(Table2, { children: [
|
|
5591
|
+
/* @__PURE__ */ jsx50(TableHead2, { children: /* @__PURE__ */ jsxs29(TableRow2, { children: [
|
|
5592
|
+
/* @__PURE__ */ jsx50(TableCellHead2, { children: "Name" }),
|
|
5593
|
+
/* @__PURE__ */ jsx50(TableCellHead2, { children: "Value" }),
|
|
5594
|
+
addOmitIfEmpty ? /* @__PURE__ */ jsx50(TableCellHead2, { children: "Omit If Empty" }) : null
|
|
5567
5595
|
] }) }),
|
|
5568
5596
|
/* @__PURE__ */ jsxs29(TableBody2, { children: [
|
|
5569
5597
|
(_b = (_a = request.baseRequest) == null ? void 0 : _a.headers) == null ? void 0 : _b.map((baseHeader) => {
|
|
5570
5598
|
return /* @__PURE__ */ jsxs29(TableRow2, { children: [
|
|
5571
5599
|
/* @__PURE__ */ jsxs29(TableCellData2, { width: "50%", children: [
|
|
5572
5600
|
baseHeader.key,
|
|
5573
|
-
/* @__PURE__ */
|
|
5574
|
-
/* @__PURE__ */
|
|
5601
|
+
/* @__PURE__ */ jsx50("br", {}),
|
|
5602
|
+
/* @__PURE__ */ jsx50("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ jsx50("small", { children: "from data source" }) })
|
|
5575
5603
|
] }),
|
|
5576
5604
|
/* @__PURE__ */ jsxs29(TableCellData2, { width: "50%", children: [
|
|
5577
|
-
/* @__PURE__ */
|
|
5578
|
-
request.headers.find((p) => p.key === baseHeader.key) ? /* @__PURE__ */
|
|
5605
|
+
/* @__PURE__ */ jsx50("i", { css: { color: "var(--gray-500)" }, children: baseHeader.value }),
|
|
5606
|
+
request.headers.find((p) => p.key === baseHeader.key) ? /* @__PURE__ */ jsx50(WarningMessage2, { message: "overridden below" }) : null
|
|
5579
5607
|
] })
|
|
5580
5608
|
] }, baseHeader.key);
|
|
5581
5609
|
}),
|
|
5582
5610
|
deezHeaders.map((header, index) => {
|
|
5583
5611
|
return /* @__PURE__ */ jsxs29(TableRow2, { children: [
|
|
5584
|
-
/* @__PURE__ */
|
|
5612
|
+
/* @__PURE__ */ jsx50(TableCellData2, { width: "50%", children: /* @__PURE__ */ jsx50(
|
|
5585
5613
|
Input3,
|
|
5586
5614
|
{
|
|
5587
5615
|
label: header.key,
|
|
@@ -5601,7 +5629,7 @@ function RequestHeaders({
|
|
|
5601
5629
|
"data-testid": "header-key"
|
|
5602
5630
|
}
|
|
5603
5631
|
) }),
|
|
5604
|
-
/* @__PURE__ */
|
|
5632
|
+
/* @__PURE__ */ jsx50(TableCellData2, { width: "50%", children: header.key ? /* @__PURE__ */ jsx50(
|
|
5605
5633
|
InputVariables,
|
|
5606
5634
|
{
|
|
5607
5635
|
value: header.value,
|
|
@@ -5612,7 +5640,7 @@ function RequestHeaders({
|
|
|
5612
5640
|
"data-testid": "header-value"
|
|
5613
5641
|
}
|
|
5614
5642
|
) : null }),
|
|
5615
|
-
addOmitIfEmpty ? /* @__PURE__ */
|
|
5643
|
+
addOmitIfEmpty ? /* @__PURE__ */ jsx50(TableCellData2, { width: "50%", children: header.key ? /* @__PURE__ */ jsx50(
|
|
5616
5644
|
Input3,
|
|
5617
5645
|
{
|
|
5618
5646
|
type: "checkbox",
|
|
@@ -5637,11 +5665,11 @@ function RequestHeaders({
|
|
|
5637
5665
|
|
|
5638
5666
|
// src/components/Request/RequestMethodSelect.tsx
|
|
5639
5667
|
import { InputSelect as InputSelect5 } from "@uniformdev/design-system";
|
|
5640
|
-
import { jsx as
|
|
5668
|
+
import { jsx as jsx51 } from "@emotion/react/jsx-runtime";
|
|
5641
5669
|
function RequestMethodSelect(props) {
|
|
5642
5670
|
var _a;
|
|
5643
5671
|
const { request, dispatch } = useRequest();
|
|
5644
|
-
return /* @__PURE__ */
|
|
5672
|
+
return /* @__PURE__ */ jsx51(
|
|
5645
5673
|
InputSelect5,
|
|
5646
5674
|
{
|
|
5647
5675
|
...props,
|
|
@@ -5667,7 +5695,7 @@ import {
|
|
|
5667
5695
|
TableRow as TableRow3,
|
|
5668
5696
|
WarningMessage as WarningMessage3
|
|
5669
5697
|
} from "@uniformdev/design-system";
|
|
5670
|
-
import { jsx as
|
|
5698
|
+
import { jsx as jsx52, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
|
|
5671
5699
|
function RequestParameters({
|
|
5672
5700
|
disableVariables,
|
|
5673
5701
|
addOmitIfEmpty
|
|
@@ -5687,29 +5715,29 @@ function RequestParameters({
|
|
|
5687
5715
|
index
|
|
5688
5716
|
});
|
|
5689
5717
|
};
|
|
5690
|
-
return /* @__PURE__ */
|
|
5691
|
-
/* @__PURE__ */
|
|
5692
|
-
/* @__PURE__ */
|
|
5693
|
-
/* @__PURE__ */
|
|
5694
|
-
addOmitIfEmpty ? /* @__PURE__ */
|
|
5718
|
+
return /* @__PURE__ */ jsx52("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs30(Table3, { children: [
|
|
5719
|
+
/* @__PURE__ */ jsx52(TableHead3, { children: /* @__PURE__ */ jsxs30(TableRow3, { children: [
|
|
5720
|
+
/* @__PURE__ */ jsx52(TableCellHead3, { children: "Name" }),
|
|
5721
|
+
/* @__PURE__ */ jsx52(TableCellHead3, { children: "Value" }),
|
|
5722
|
+
addOmitIfEmpty ? /* @__PURE__ */ jsx52(TableCellHead3, { children: "Omit If Empty" }) : null
|
|
5695
5723
|
] }) }),
|
|
5696
5724
|
/* @__PURE__ */ jsxs30(TableBody3, { children: [
|
|
5697
5725
|
(_b = (_a = request.baseRequest) == null ? void 0 : _a.parameters) == null ? void 0 : _b.map((baseParameter) => {
|
|
5698
5726
|
return /* @__PURE__ */ jsxs30(TableRow3, { children: [
|
|
5699
5727
|
/* @__PURE__ */ jsxs30(TableCellData3, { width: "50%", children: [
|
|
5700
5728
|
baseParameter.key,
|
|
5701
|
-
/* @__PURE__ */
|
|
5702
|
-
/* @__PURE__ */
|
|
5729
|
+
/* @__PURE__ */ jsx52("br", {}),
|
|
5730
|
+
/* @__PURE__ */ jsx52("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ jsx52("small", { children: "from data source" }) })
|
|
5703
5731
|
] }),
|
|
5704
5732
|
/* @__PURE__ */ jsxs30(TableCellData3, { width: "50%", children: [
|
|
5705
|
-
/* @__PURE__ */
|
|
5706
|
-
request.parameters.find((p) => p.key === baseParameter.key) ? /* @__PURE__ */
|
|
5733
|
+
/* @__PURE__ */ jsx52("i", { css: { color: "var(--gray-500)" }, children: baseParameter.value }),
|
|
5734
|
+
request.parameters.find((p) => p.key === baseParameter.key) ? /* @__PURE__ */ jsx52(WarningMessage3, { message: "overridden below" }) : null
|
|
5707
5735
|
] })
|
|
5708
5736
|
] }, baseParameter.key);
|
|
5709
5737
|
}),
|
|
5710
5738
|
deezParameters.map((parameter, index) => {
|
|
5711
5739
|
return /* @__PURE__ */ jsxs30(TableRow3, { children: [
|
|
5712
|
-
/* @__PURE__ */
|
|
5740
|
+
/* @__PURE__ */ jsx52(TableCellData3, { width: "50%", children: /* @__PURE__ */ jsx52(
|
|
5713
5741
|
Input4,
|
|
5714
5742
|
{
|
|
5715
5743
|
label: parameter.key,
|
|
@@ -5733,7 +5761,7 @@ function RequestParameters({
|
|
|
5733
5761
|
"data-testid": "parameter-key"
|
|
5734
5762
|
}
|
|
5735
5763
|
) }),
|
|
5736
|
-
/* @__PURE__ */
|
|
5764
|
+
/* @__PURE__ */ jsx52(TableCellData3, { width: "50%", children: parameter.key ? /* @__PURE__ */ jsx52(
|
|
5737
5765
|
InputVariables,
|
|
5738
5766
|
{
|
|
5739
5767
|
value: parameter.value,
|
|
@@ -5749,7 +5777,7 @@ function RequestParameters({
|
|
|
5749
5777
|
enableEditingVariables: true
|
|
5750
5778
|
}
|
|
5751
5779
|
) : null }),
|
|
5752
|
-
addOmitIfEmpty ? /* @__PURE__ */
|
|
5780
|
+
addOmitIfEmpty ? /* @__PURE__ */ jsx52(TableCellData3, { width: "50%", children: parameter.key ? /* @__PURE__ */ jsx52(
|
|
5753
5781
|
Input4,
|
|
5754
5782
|
{
|
|
5755
5783
|
type: "checkbox",
|
|
@@ -5797,7 +5825,7 @@ function decodeVariablesInUrlEncodedString(string, varValues) {
|
|
|
5797
5825
|
}
|
|
5798
5826
|
|
|
5799
5827
|
// src/components/Request/RequestUrl.tsx
|
|
5800
|
-
import { Fragment as Fragment12, jsx as
|
|
5828
|
+
import { Fragment as Fragment12, jsx as jsx53, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
|
|
5801
5829
|
function RequestUrl() {
|
|
5802
5830
|
var _a, _b;
|
|
5803
5831
|
const { variables } = useVariables();
|
|
@@ -5818,7 +5846,7 @@ function RequestUrl() {
|
|
|
5818
5846
|
word-break: break-word;
|
|
5819
5847
|
`,
|
|
5820
5848
|
children: [
|
|
5821
|
-
request.baseRequest ? /* @__PURE__ */
|
|
5849
|
+
request.baseRequest ? /* @__PURE__ */ jsx53("span", { children: (_b = request.baseRequest) == null ? void 0 : _b.baseUrl }) : null,
|
|
5822
5850
|
/* @__PURE__ */ jsxs31("span", { css: { fontWeight: request.baseRequest ? "bold" : "inherit" }, children: [
|
|
5823
5851
|
urlEncodeRequestUrl(request.relativeUrl, variables),
|
|
5824
5852
|
mergedParameters.length > 0 ? /* @__PURE__ */ jsxs31(Fragment12, { children: [
|
|
@@ -5864,10 +5892,10 @@ function transformPastedUrl(value, currentRequest, dispatch) {
|
|
|
5864
5892
|
}
|
|
5865
5893
|
|
|
5866
5894
|
// src/components/Request/RequestUrlInput.tsx
|
|
5867
|
-
import { jsx as
|
|
5895
|
+
import { jsx as jsx54 } from "@emotion/react/jsx-runtime";
|
|
5868
5896
|
function RequestUrlInput(props) {
|
|
5869
5897
|
const { request, dispatch } = useRequest();
|
|
5870
|
-
return /* @__PURE__ */
|
|
5898
|
+
return /* @__PURE__ */ jsx54(
|
|
5871
5899
|
InputVariables,
|
|
5872
5900
|
{
|
|
5873
5901
|
...props,
|
|
@@ -5917,12 +5945,12 @@ function useRequestParameter(paramName) {
|
|
|
5917
5945
|
}
|
|
5918
5946
|
|
|
5919
5947
|
// src/components/DataSourceEditor.tsx
|
|
5920
|
-
import { jsx as
|
|
5948
|
+
import { jsx as jsx55 } from "@emotion/react/jsx-runtime";
|
|
5921
5949
|
function DataSourceEditor({ onChange, children, editVariableComponent }) {
|
|
5922
5950
|
var _a;
|
|
5923
5951
|
const { value } = useMeshLocation("dataSource");
|
|
5924
5952
|
const currentRequestValue = convertDataSourceToRequestData(value);
|
|
5925
|
-
return /* @__PURE__ */
|
|
5953
|
+
return /* @__PURE__ */ jsx55(
|
|
5926
5954
|
VariablesProvider,
|
|
5927
5955
|
{
|
|
5928
5956
|
value: (_a = value.variables) != null ? _a : {},
|
|
@@ -5938,7 +5966,7 @@ function DataSourceEditor({ onChange, children, editVariableComponent }) {
|
|
|
5938
5966
|
},
|
|
5939
5967
|
editVariableComponent,
|
|
5940
5968
|
readOnly: true,
|
|
5941
|
-
children: /* @__PURE__ */
|
|
5969
|
+
children: /* @__PURE__ */ jsx55(
|
|
5942
5970
|
RequestProvider,
|
|
5943
5971
|
{
|
|
5944
5972
|
value: currentRequestValue,
|
|
@@ -5975,7 +6003,7 @@ function convertRequestDataToDataSource(dataSource, requestData) {
|
|
|
5975
6003
|
}
|
|
5976
6004
|
|
|
5977
6005
|
// src/components/DataTypeEditor.tsx
|
|
5978
|
-
import { jsx as
|
|
6006
|
+
import { jsx as jsx56 } from "@emotion/react/jsx-runtime";
|
|
5979
6007
|
function DataTypeEditor({ onChange, children, editVariableComponent }) {
|
|
5980
6008
|
var _a;
|
|
5981
6009
|
const {
|
|
@@ -5984,7 +6012,7 @@ function DataTypeEditor({ onChange, children, editVariableComponent }) {
|
|
|
5984
6012
|
isReadOnly
|
|
5985
6013
|
} = useMeshLocation("dataType");
|
|
5986
6014
|
const currentRequestValue = convertDataTypeToRequestData(value, dataSource);
|
|
5987
|
-
return /* @__PURE__ */
|
|
6015
|
+
return /* @__PURE__ */ jsx56(
|
|
5988
6016
|
VariablesProvider,
|
|
5989
6017
|
{
|
|
5990
6018
|
value: (_a = value.variables) != null ? _a : {},
|
|
@@ -6000,7 +6028,7 @@ function DataTypeEditor({ onChange, children, editVariableComponent }) {
|
|
|
6000
6028
|
},
|
|
6001
6029
|
editVariableComponent,
|
|
6002
6030
|
readOnly: isReadOnly,
|
|
6003
|
-
children: /* @__PURE__ */
|
|
6031
|
+
children: /* @__PURE__ */ jsx56(
|
|
6004
6032
|
RequestProvider,
|
|
6005
6033
|
{
|
|
6006
6034
|
value: currentRequestValue,
|
|
@@ -6050,10 +6078,10 @@ import { LoadingIndicator as LoadingIndicator3, Theme as Theme2 } from "@uniform
|
|
|
6050
6078
|
|
|
6051
6079
|
// src/hooks/useInitializeUniformMeshSdk.ts
|
|
6052
6080
|
import { initializeUniformMeshSDK } from "@uniformdev/mesh-sdk";
|
|
6053
|
-
import { useEffect as useEffect15, useRef as useRef14, useState as
|
|
6081
|
+
import { useEffect as useEffect15, useRef as useRef14, useState as useState15 } from "react";
|
|
6054
6082
|
var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
6055
|
-
const [error, setError] =
|
|
6056
|
-
const [sdk, setSdk] =
|
|
6083
|
+
const [error, setError] = useState15();
|
|
6084
|
+
const [sdk, setSdk] = useState15();
|
|
6057
6085
|
const initializationInProgress = useRef14(false);
|
|
6058
6086
|
useEffect15(
|
|
6059
6087
|
() => {
|
|
@@ -6088,7 +6116,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
|
6088
6116
|
};
|
|
6089
6117
|
|
|
6090
6118
|
// src/components/MeshApp.tsx
|
|
6091
|
-
import { jsx as
|
|
6119
|
+
import { jsx as jsx57, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
|
|
6092
6120
|
var MeshApp = ({
|
|
6093
6121
|
children,
|
|
6094
6122
|
loadingComponent,
|
|
@@ -6097,25 +6125,25 @@ var MeshApp = ({
|
|
|
6097
6125
|
const { initializing, error, sdk } = useInitializeUniformMeshSdk();
|
|
6098
6126
|
if (initializing || !sdk) {
|
|
6099
6127
|
const LoadingComponent = loadingComponent;
|
|
6100
|
-
return LoadingComponent ? /* @__PURE__ */
|
|
6128
|
+
return LoadingComponent ? /* @__PURE__ */ jsx57(LoadingComponent, {}) : /* @__PURE__ */ jsx57(LoadingIndicator3, {});
|
|
6101
6129
|
}
|
|
6102
6130
|
if (error) {
|
|
6103
6131
|
const ErrorComponent = errorComponent;
|
|
6104
6132
|
if (ErrorComponent) {
|
|
6105
|
-
return /* @__PURE__ */
|
|
6133
|
+
return /* @__PURE__ */ jsx57(ErrorComponent, { error });
|
|
6106
6134
|
}
|
|
6107
6135
|
throw error;
|
|
6108
6136
|
}
|
|
6109
6137
|
return /* @__PURE__ */ jsxs32(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
|
|
6110
|
-
/* @__PURE__ */
|
|
6111
|
-
/* @__PURE__ */
|
|
6138
|
+
/* @__PURE__ */ jsx57(Theme2, {}),
|
|
6139
|
+
/* @__PURE__ */ jsx57(UniformMeshLocationContextProvider, { children })
|
|
6112
6140
|
] });
|
|
6113
6141
|
};
|
|
6114
6142
|
|
|
6115
6143
|
// src/components/ObjectSearch/DataRefreshButton.tsx
|
|
6116
6144
|
import { css as css30 } from "@emotion/react";
|
|
6117
6145
|
import { Button as Button3, LoadingIndicator as LoadingIndicator4 } from "@uniformdev/design-system";
|
|
6118
|
-
import { jsx as
|
|
6146
|
+
import { jsx as jsx58, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
|
|
6119
6147
|
var DataRefreshButton = ({
|
|
6120
6148
|
buttonText,
|
|
6121
6149
|
isLoading,
|
|
@@ -6123,7 +6151,7 @@ var DataRefreshButton = ({
|
|
|
6123
6151
|
...props
|
|
6124
6152
|
}) => {
|
|
6125
6153
|
return /* @__PURE__ */ jsxs33(Button3, { buttonType: "primaryInvert", onClick: onRefreshData, disabled: isLoading, ...props, children: [
|
|
6126
|
-
!isLoading ? null : /* @__PURE__ */
|
|
6154
|
+
!isLoading ? null : /* @__PURE__ */ jsx58(
|
|
6127
6155
|
LoadingIndicator4,
|
|
6128
6156
|
{
|
|
6129
6157
|
css: css30`
|
|
@@ -6136,9 +6164,9 @@ var DataRefreshButton = ({
|
|
|
6136
6164
|
};
|
|
6137
6165
|
|
|
6138
6166
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
6139
|
-
import { css as
|
|
6167
|
+
import { css as css32 } from "@emotion/react";
|
|
6140
6168
|
import { bindVariables } from "@uniformdev/canvas";
|
|
6141
|
-
import { Container, IconsProvider, ScrollableList, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
|
|
6169
|
+
import { Callout as Callout5, Container, IconsProvider, ScrollableList, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
|
|
6142
6170
|
|
|
6143
6171
|
// src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
|
|
6144
6172
|
import { bindVariablesToObject as bindVariablesToObject2 } from "@uniformdev/canvas";
|
|
@@ -6148,9 +6176,9 @@ import {
|
|
|
6148
6176
|
useContext as useContext7,
|
|
6149
6177
|
useDeferredValue,
|
|
6150
6178
|
useMemo as useMemo14,
|
|
6151
|
-
useState as
|
|
6179
|
+
useState as useState16
|
|
6152
6180
|
} from "react";
|
|
6153
|
-
import { jsx as
|
|
6181
|
+
import { jsx as jsx59 } from "@emotion/react/jsx-runtime";
|
|
6154
6182
|
var ObjectSearchContext = createContext5({
|
|
6155
6183
|
onSetQuery: () => {
|
|
6156
6184
|
},
|
|
@@ -6163,17 +6191,24 @@ var ObjectSearchContext = createContext5({
|
|
|
6163
6191
|
},
|
|
6164
6192
|
selectedListItems: [],
|
|
6165
6193
|
onRemoveAllSelectedItems: () => {
|
|
6166
|
-
}
|
|
6194
|
+
},
|
|
6195
|
+
isMulti: false
|
|
6167
6196
|
});
|
|
6168
|
-
var ObjectSearchProvider = ({
|
|
6169
|
-
|
|
6197
|
+
var ObjectSearchProvider = ({
|
|
6198
|
+
currentlySelectedItems,
|
|
6199
|
+
isMulti = false,
|
|
6200
|
+
children,
|
|
6201
|
+
defaultQuery
|
|
6202
|
+
}) => {
|
|
6203
|
+
const [query, setQuery] = useState16({
|
|
6170
6204
|
contentType: "",
|
|
6171
|
-
keyword: ""
|
|
6205
|
+
keyword: "",
|
|
6206
|
+
...defaultQuery
|
|
6172
6207
|
});
|
|
6173
6208
|
const { flatVariables } = useVariables(true);
|
|
6174
6209
|
const querySearchDeferred = useDeferredValue(query);
|
|
6175
|
-
const [selectedItems, setSelectedItems] =
|
|
6176
|
-
const [list, setList] =
|
|
6210
|
+
const [selectedItems, setSelectedItems] = useState16(currentlySelectedItems != null ? currentlySelectedItems : []);
|
|
6211
|
+
const [list, setList] = useState16({});
|
|
6177
6212
|
const onSetQuery = useCallback4(
|
|
6178
6213
|
(value2) => {
|
|
6179
6214
|
if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
|
|
@@ -6219,6 +6254,7 @@ var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
|
|
|
6219
6254
|
selectedListItems: selectedItems,
|
|
6220
6255
|
onRemoveAllSelectedItems,
|
|
6221
6256
|
list,
|
|
6257
|
+
isMulti,
|
|
6222
6258
|
onSetList
|
|
6223
6259
|
}),
|
|
6224
6260
|
[
|
|
@@ -6229,10 +6265,11 @@ var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
|
|
|
6229
6265
|
selectedItems,
|
|
6230
6266
|
onRemoveAllSelectedItems,
|
|
6231
6267
|
list,
|
|
6268
|
+
isMulti,
|
|
6232
6269
|
onSetList
|
|
6233
6270
|
]
|
|
6234
6271
|
);
|
|
6235
|
-
return /* @__PURE__ */
|
|
6272
|
+
return /* @__PURE__ */ jsx59(ObjectSearchContext.Provider, { value, children });
|
|
6236
6273
|
};
|
|
6237
6274
|
function useObjectSearchContext() {
|
|
6238
6275
|
return useContext7(ObjectSearchContext);
|
|
@@ -6249,8 +6286,148 @@ function bindQuery(query, inputs) {
|
|
|
6249
6286
|
return result;
|
|
6250
6287
|
}
|
|
6251
6288
|
|
|
6289
|
+
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
6290
|
+
import { Chip, Popover } from "@uniformdev/design-system";
|
|
6291
|
+
|
|
6292
|
+
// src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
|
|
6293
|
+
import { css as css31 } from "@emotion/react";
|
|
6294
|
+
import { skeletonLoading } from "@uniformdev/design-system";
|
|
6295
|
+
var ObjectListItemContainer = css31`
|
|
6296
|
+
align-items: center;
|
|
6297
|
+
border: 1px solid var(--gray-300);
|
|
6298
|
+
border-radius: var(--rounded-base);
|
|
6299
|
+
background: var(--white);
|
|
6300
|
+
display: grid;
|
|
6301
|
+
grid-template-columns: 1fr auto;
|
|
6302
|
+
padding: var(--spacing-sm);
|
|
6303
|
+
`;
|
|
6304
|
+
var ObjectListItemContainerDisabled = css31`
|
|
6305
|
+
opacity: var(--opacity-50);
|
|
6306
|
+
pointer-events: none;
|
|
6307
|
+
`;
|
|
6308
|
+
var ObjectListItemLoading = css31`
|
|
6309
|
+
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
6310
|
+
border-color: transparent;
|
|
6311
|
+
min-height: 42px;
|
|
6312
|
+
position: relative;
|
|
6313
|
+
|
|
6314
|
+
&:before,
|
|
6315
|
+
&:after {
|
|
6316
|
+
background: var(--gray-200);
|
|
6317
|
+
content: '';
|
|
6318
|
+
display: block;
|
|
6319
|
+
height: 1rem;
|
|
6320
|
+
}
|
|
6321
|
+
|
|
6322
|
+
&:before {
|
|
6323
|
+
border-radius: var(--rounded-base);
|
|
6324
|
+
width: 10rem;
|
|
6325
|
+
}
|
|
6326
|
+
|
|
6327
|
+
&:after {
|
|
6328
|
+
border-radius: var(--rounded-full);
|
|
6329
|
+
width: 1rem;
|
|
6330
|
+
}
|
|
6331
|
+
`;
|
|
6332
|
+
var ObjectListItemHeadingGroup = css31`
|
|
6333
|
+
align-items: center;
|
|
6334
|
+
display: grid;
|
|
6335
|
+
`;
|
|
6336
|
+
var ObjectListItemThumbnail = css31`
|
|
6337
|
+
width: 30px;
|
|
6338
|
+
object-fit: contain;
|
|
6339
|
+
`;
|
|
6340
|
+
var ObjectListItemTitle = css31`
|
|
6341
|
+
color: var(--typography-base);
|
|
6342
|
+
display: block;
|
|
6343
|
+
font-size: var(--fs-sm);
|
|
6344
|
+
`;
|
|
6345
|
+
var ObjectListItemSubtitle = css31`
|
|
6346
|
+
color: var(--gray-500);
|
|
6347
|
+
display: block;
|
|
6348
|
+
font-size: var(--fs-xs);
|
|
6349
|
+
line-height: 1;
|
|
6350
|
+
`;
|
|
6351
|
+
var ObjectListItemInfoContainer = css31`
|
|
6352
|
+
align-items: center;
|
|
6353
|
+
display: flex;
|
|
6354
|
+
gap: var(--spacing-sm);
|
|
6355
|
+
justify-content: center;
|
|
6356
|
+
`;
|
|
6357
|
+
var ObjectListItemControlledContent = css31`
|
|
6358
|
+
display: flex;
|
|
6359
|
+
gap: var(--spacing-sm);
|
|
6360
|
+
`;
|
|
6361
|
+
var ObjectListItemUnControlledContent = css31`
|
|
6362
|
+
margin-top: var(--spacing-sm);
|
|
6363
|
+
grid-column: 1 / -1;
|
|
6364
|
+
`;
|
|
6365
|
+
|
|
6366
|
+
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
6367
|
+
import { jsx as jsx60, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
|
|
6368
|
+
var ObjectSearchListItem = ({
|
|
6369
|
+
id,
|
|
6370
|
+
title,
|
|
6371
|
+
contentType,
|
|
6372
|
+
image,
|
|
6373
|
+
imageUrl,
|
|
6374
|
+
popoverData,
|
|
6375
|
+
onSelect,
|
|
6376
|
+
isMulti,
|
|
6377
|
+
disabled,
|
|
6378
|
+
children
|
|
6379
|
+
}) => {
|
|
6380
|
+
const { onSelectItem, selectedListItems, isMulti: globalIsMulti } = useObjectSearchContext();
|
|
6381
|
+
const formatedContentType = Array.isArray(contentType) ? contentType.join(", ") : contentType;
|
|
6382
|
+
const handleSelectItem = () => {
|
|
6383
|
+
var _a;
|
|
6384
|
+
const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
|
|
6385
|
+
const selectedItem = { id, title, contentType, imageUrl, image, popoverData, ...extraData };
|
|
6386
|
+
if (isMulti === true || globalIsMulti) {
|
|
6387
|
+
return onSelectItem(selectedItem);
|
|
6388
|
+
}
|
|
6389
|
+
return onSelectItem([selectedItem]);
|
|
6390
|
+
};
|
|
6391
|
+
const selected = selectedListItems.some((item) => item.id === id);
|
|
6392
|
+
return /* @__PURE__ */ jsxs34(
|
|
6393
|
+
"div",
|
|
6394
|
+
{
|
|
6395
|
+
role: "listitem",
|
|
6396
|
+
css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
|
|
6397
|
+
"data-testid": "list-item",
|
|
6398
|
+
children: [
|
|
6399
|
+
/* @__PURE__ */ jsxs34(
|
|
6400
|
+
"div",
|
|
6401
|
+
{
|
|
6402
|
+
role: "button",
|
|
6403
|
+
onClick: handleSelectItem,
|
|
6404
|
+
css: ObjectListItemControlledContent,
|
|
6405
|
+
"aria-disabled": disabled,
|
|
6406
|
+
children: [
|
|
6407
|
+
!imageUrl ? null : /* @__PURE__ */ jsx60("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectListItemThumbnail }),
|
|
6408
|
+
!image || imageUrl ? null : /* @__PURE__ */ jsx60("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6409
|
+
/* @__PURE__ */ jsxs34("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6410
|
+
!contentType ? null : /* @__PURE__ */ jsx60("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6411
|
+
/* @__PURE__ */ jsx60("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
|
|
6412
|
+
] })
|
|
6413
|
+
]
|
|
6414
|
+
}
|
|
6415
|
+
),
|
|
6416
|
+
/* @__PURE__ */ jsxs34("div", { css: ObjectListItemInfoContainer, children: [
|
|
6417
|
+
selected ? /* @__PURE__ */ jsx60(Chip, { text: "selected", size: "xs" }) : null,
|
|
6418
|
+
!popoverData ? null : /* @__PURE__ */ jsx60(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6419
|
+
] }),
|
|
6420
|
+
!children ? null : /* @__PURE__ */ jsx60("div", { css: ObjectListItemUnControlledContent, children })
|
|
6421
|
+
]
|
|
6422
|
+
}
|
|
6423
|
+
);
|
|
6424
|
+
};
|
|
6425
|
+
var ObjectSearchListItemLoadingSkeleton = () => {
|
|
6426
|
+
return /* @__PURE__ */ jsx60("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
|
|
6427
|
+
};
|
|
6428
|
+
|
|
6252
6429
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
6253
|
-
import { jsx as
|
|
6430
|
+
import { jsx as jsx61, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
|
|
6254
6431
|
var ObjectSearchContainer = ({
|
|
6255
6432
|
label,
|
|
6256
6433
|
enableDynamicInputToResultId,
|
|
@@ -6262,21 +6439,22 @@ var ObjectSearchContainer = ({
|
|
|
6262
6439
|
const { onSelectItem, selectedListItems, list } = useObjectSearchContext();
|
|
6263
6440
|
const { flatVariables } = useVariables(true);
|
|
6264
6441
|
const inputValue = (_b = (_a = selectedListItems == null ? void 0 : selectedListItems[0]) == null ? void 0 : _a.id) != null ? _b : "";
|
|
6265
|
-
const
|
|
6442
|
+
const listItems = resultList != null ? resultList : /* @__PURE__ */ jsx61(
|
|
6443
|
+
ScrollableList,
|
|
6444
|
+
{
|
|
6445
|
+
role: "list",
|
|
6446
|
+
css: css32`
|
|
6447
|
+
> div {
|
|
6448
|
+
transition: max-height var(--duration-slow) var(--timing-ease-out);
|
|
6449
|
+
max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
|
|
6450
|
+
}
|
|
6451
|
+
`,
|
|
6452
|
+
children: /* @__PURE__ */ jsx61(DefaultResultList, {})
|
|
6453
|
+
}
|
|
6454
|
+
);
|
|
6455
|
+
const body = /* @__PURE__ */ jsxs35(VerticalRhythm2, { children: [
|
|
6266
6456
|
searchFilters,
|
|
6267
|
-
|
|
6268
|
-
ScrollableList,
|
|
6269
|
-
{
|
|
6270
|
-
role: "list",
|
|
6271
|
-
css: css31`
|
|
6272
|
-
> div {
|
|
6273
|
-
transition: max-height var(--duration-slow) var(--timing-ease-out);
|
|
6274
|
-
max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
|
|
6275
|
-
}
|
|
6276
|
-
`,
|
|
6277
|
-
children: resultList
|
|
6278
|
-
}
|
|
6279
|
-
)
|
|
6457
|
+
listItems
|
|
6280
6458
|
] });
|
|
6281
6459
|
const handleSelectedVariableChange = (selectedValue) => {
|
|
6282
6460
|
var _a2;
|
|
@@ -6305,8 +6483,8 @@ var ObjectSearchContainer = ({
|
|
|
6305
6483
|
}
|
|
6306
6484
|
]);
|
|
6307
6485
|
};
|
|
6308
|
-
return /* @__PURE__ */
|
|
6309
|
-
/* @__PURE__ */
|
|
6486
|
+
return /* @__PURE__ */ jsx61(IconsProvider, { children: /* @__PURE__ */ jsxs35(VerticalRhythm2, { children: [
|
|
6487
|
+
/* @__PURE__ */ jsx61(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx61(
|
|
6310
6488
|
InputVariables,
|
|
6311
6489
|
{
|
|
6312
6490
|
label,
|
|
@@ -6324,14 +6502,25 @@ var ObjectSearchContainer = ({
|
|
|
6324
6502
|
children
|
|
6325
6503
|
] }) });
|
|
6326
6504
|
};
|
|
6505
|
+
var DefaultResultList = () => {
|
|
6506
|
+
var _a;
|
|
6507
|
+
const { list } = useObjectSearchContext();
|
|
6508
|
+
if (!list.items) {
|
|
6509
|
+
return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ jsx61(ObjectSearchListItemLoadingSkeleton, {}, i));
|
|
6510
|
+
}
|
|
6511
|
+
if (list.items.length === 0) {
|
|
6512
|
+
return /* @__PURE__ */ jsx61(Callout5, { type: "info", children: "No results were found" });
|
|
6513
|
+
}
|
|
6514
|
+
return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ jsx61(ObjectSearchListItem, { ...item }, item.id));
|
|
6515
|
+
};
|
|
6327
6516
|
|
|
6328
6517
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
6329
6518
|
import { InputKeywordSearch as InputKeywordSearch2, InputSelect as InputSelect6 } from "@uniformdev/design-system";
|
|
6330
|
-
import { useMemo as useMemo15, useState as
|
|
6519
|
+
import { useMemo as useMemo15, useState as useState17 } from "react";
|
|
6331
6520
|
|
|
6332
6521
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
6333
|
-
import { css as
|
|
6334
|
-
var ObjectSearchFilterContainerLabel =
|
|
6522
|
+
import { css as css33 } from "@emotion/react";
|
|
6523
|
+
var ObjectSearchFilterContainerLabel = css33`
|
|
6335
6524
|
align-items: center;
|
|
6336
6525
|
display: flex;
|
|
6337
6526
|
font-size: var(--fs-sm);
|
|
@@ -6339,18 +6528,18 @@ var ObjectSearchFilterContainerLabel = css32`
|
|
|
6339
6528
|
line-height: 1rem;
|
|
6340
6529
|
margin-bottom: var(--spacing-sm);
|
|
6341
6530
|
`;
|
|
6342
|
-
var ObjectSearchFilterContainer =
|
|
6531
|
+
var ObjectSearchFilterContainer = css33`
|
|
6343
6532
|
display: grid;
|
|
6344
6533
|
gap: var(--spacing-base);
|
|
6345
6534
|
`;
|
|
6346
|
-
var ObjectSearchFilterGrid = (gridColumns) =>
|
|
6535
|
+
var ObjectSearchFilterGrid = (gridColumns) => css33`
|
|
6347
6536
|
display: grid;
|
|
6348
6537
|
grid-template-columns: ${gridColumns};
|
|
6349
6538
|
gap: var(--spacing-base);
|
|
6350
6539
|
`;
|
|
6351
6540
|
|
|
6352
6541
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
6353
|
-
import { jsx as
|
|
6542
|
+
import { jsx as jsx62, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
|
|
6354
6543
|
var ObjectSearchFilter = ({
|
|
6355
6544
|
requireContentType,
|
|
6356
6545
|
typeSelectorAllTypesOptionText = "All content types",
|
|
@@ -6359,10 +6548,11 @@ var ObjectSearchFilter = ({
|
|
|
6359
6548
|
selectLabel = "Content Type Select",
|
|
6360
6549
|
selectOptions
|
|
6361
6550
|
}) => {
|
|
6551
|
+
var _a, _b;
|
|
6362
6552
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
6363
|
-
const [searchState, setSearchState] =
|
|
6364
|
-
contentType: "",
|
|
6365
|
-
keyword: ""
|
|
6553
|
+
const [searchState, setSearchState] = useState17({
|
|
6554
|
+
contentType: (_a = query.contentType) != null ? _a : "",
|
|
6555
|
+
keyword: (_b = query.keyword) != null ? _b : ""
|
|
6366
6556
|
});
|
|
6367
6557
|
const handleFilterChange = (value) => {
|
|
6368
6558
|
setSearchState((prev) => {
|
|
@@ -6376,14 +6566,11 @@ var ObjectSearchFilter = ({
|
|
|
6376
6566
|
}
|
|
6377
6567
|
return [
|
|
6378
6568
|
...!requireContentType ? [{ value: "any", label: typeSelectorAllTypesOptionText }] : [],
|
|
6379
|
-
...selectOptions ? selectOptions
|
|
6380
|
-
var _a;
|
|
6381
|
-
return { name: option == null ? void 0 : option.name, label: (_a = option.label) != null ? _a : option == null ? void 0 : option.name, id: option.id };
|
|
6382
|
-
}) : []
|
|
6569
|
+
...selectOptions != null ? selectOptions : []
|
|
6383
6570
|
];
|
|
6384
6571
|
}, [requireContentType, typeSelectorAllTypesOptionText, selectOptions]);
|
|
6385
6572
|
const shouldRenderSelect = memoizedSelectOptions.length > 0;
|
|
6386
|
-
return /* @__PURE__ */
|
|
6573
|
+
return /* @__PURE__ */ jsxs36(
|
|
6387
6574
|
"fieldset",
|
|
6388
6575
|
{
|
|
6389
6576
|
css: [
|
|
@@ -6391,7 +6578,7 @@ var ObjectSearchFilter = ({
|
|
|
6391
6578
|
ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
|
|
6392
6579
|
],
|
|
6393
6580
|
children: [
|
|
6394
|
-
memoizedSelectOptions.length ? /* @__PURE__ */
|
|
6581
|
+
memoizedSelectOptions.length ? /* @__PURE__ */ jsx62(
|
|
6395
6582
|
InputSelect6,
|
|
6396
6583
|
{
|
|
6397
6584
|
label: selectLabel,
|
|
@@ -6401,7 +6588,7 @@ var ObjectSearchFilter = ({
|
|
|
6401
6588
|
value: query.contentType
|
|
6402
6589
|
}
|
|
6403
6590
|
) : null,
|
|
6404
|
-
/* @__PURE__ */
|
|
6591
|
+
/* @__PURE__ */ jsx62(
|
|
6405
6592
|
InputKeywordSearch2,
|
|
6406
6593
|
{
|
|
6407
6594
|
inputFieldName: searchInputName,
|
|
@@ -6418,154 +6605,14 @@ var ObjectSearchFilter = ({
|
|
|
6418
6605
|
};
|
|
6419
6606
|
|
|
6420
6607
|
// src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
|
|
6421
|
-
import { jsx as
|
|
6608
|
+
import { jsx as jsx63, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
|
|
6422
6609
|
var ObjectSearchFilterContainer2 = ({ label, children }) => {
|
|
6423
|
-
return /* @__PURE__ */
|
|
6424
|
-
label ? /* @__PURE__ */
|
|
6425
|
-
/* @__PURE__ */
|
|
6610
|
+
return /* @__PURE__ */ jsxs37("div", { children: [
|
|
6611
|
+
label ? /* @__PURE__ */ jsx63("span", { css: ObjectSearchFilterContainerLabel, children: label }) : null,
|
|
6612
|
+
/* @__PURE__ */ jsx63("div", { css: ObjectSearchFilterContainer, children })
|
|
6426
6613
|
] });
|
|
6427
6614
|
};
|
|
6428
6615
|
|
|
6429
|
-
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
6430
|
-
import { Chip, Popover } from "@uniformdev/design-system";
|
|
6431
|
-
|
|
6432
|
-
// src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
|
|
6433
|
-
import { css as css33 } from "@emotion/react";
|
|
6434
|
-
import { skeletonLoading } from "@uniformdev/design-system";
|
|
6435
|
-
var ObjectListItemContainer = css33`
|
|
6436
|
-
align-items: center;
|
|
6437
|
-
border: 1px solid var(--gray-300);
|
|
6438
|
-
border-radius: var(--rounded-base);
|
|
6439
|
-
background: var(--white);
|
|
6440
|
-
display: grid;
|
|
6441
|
-
grid-template-columns: 1fr auto;
|
|
6442
|
-
padding: var(--spacing-sm);
|
|
6443
|
-
`;
|
|
6444
|
-
var ObjectListItemContainerDisabled = css33`
|
|
6445
|
-
opacity: var(--opacity-50);
|
|
6446
|
-
pointer-events: none;
|
|
6447
|
-
`;
|
|
6448
|
-
var ObjectListItemLoading = css33`
|
|
6449
|
-
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
6450
|
-
border-color: transparent;
|
|
6451
|
-
min-height: 42px;
|
|
6452
|
-
position: relative;
|
|
6453
|
-
|
|
6454
|
-
&:before,
|
|
6455
|
-
&:after {
|
|
6456
|
-
background: var(--gray-200);
|
|
6457
|
-
content: '';
|
|
6458
|
-
display: block;
|
|
6459
|
-
height: 1rem;
|
|
6460
|
-
}
|
|
6461
|
-
|
|
6462
|
-
&:before {
|
|
6463
|
-
border-radius: var(--rounded-base);
|
|
6464
|
-
width: 10rem;
|
|
6465
|
-
}
|
|
6466
|
-
|
|
6467
|
-
&:after {
|
|
6468
|
-
border-radius: var(--rounded-full);
|
|
6469
|
-
width: 1rem;
|
|
6470
|
-
}
|
|
6471
|
-
`;
|
|
6472
|
-
var ObjectListItemHeadingGroup = css33`
|
|
6473
|
-
align-items: center;
|
|
6474
|
-
display: grid;
|
|
6475
|
-
`;
|
|
6476
|
-
var ObjectListItemThumbnail = css33`
|
|
6477
|
-
width: 30px;
|
|
6478
|
-
object-fit: contain;
|
|
6479
|
-
`;
|
|
6480
|
-
var ObjectListItemTitle = css33`
|
|
6481
|
-
color: var(--brand-secondary-1);
|
|
6482
|
-
display: block;
|
|
6483
|
-
font-size: var(--fs-sm);
|
|
6484
|
-
`;
|
|
6485
|
-
var ObjectListItemSubtitle = css33`
|
|
6486
|
-
color: var(--gray-500);
|
|
6487
|
-
display: block;
|
|
6488
|
-
font-size: var(--fs-xs);
|
|
6489
|
-
line-height: 1;
|
|
6490
|
-
`;
|
|
6491
|
-
var ObjectListItemInfoContainer = css33`
|
|
6492
|
-
align-items: center;
|
|
6493
|
-
display: flex;
|
|
6494
|
-
gap: var(--spacing-sm);
|
|
6495
|
-
justify-content: center;
|
|
6496
|
-
`;
|
|
6497
|
-
var ObjectListItemControlledContent = css33`
|
|
6498
|
-
display: flex;
|
|
6499
|
-
gap: var(--spacing-sm);
|
|
6500
|
-
`;
|
|
6501
|
-
var ObjectListItemUnControlledContent = css33`
|
|
6502
|
-
margin-top: var(--spacing-sm);
|
|
6503
|
-
grid-column: 1 / -1;
|
|
6504
|
-
`;
|
|
6505
|
-
|
|
6506
|
-
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
6507
|
-
import { jsx as jsx62, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
|
|
6508
|
-
var ObjectSearchListItem = ({
|
|
6509
|
-
id,
|
|
6510
|
-
title,
|
|
6511
|
-
contentType,
|
|
6512
|
-
image,
|
|
6513
|
-
imageUrl,
|
|
6514
|
-
popoverData,
|
|
6515
|
-
onSelect,
|
|
6516
|
-
isMulti = false,
|
|
6517
|
-
disabled,
|
|
6518
|
-
children
|
|
6519
|
-
}) => {
|
|
6520
|
-
const { onSelectItem, selectedListItems } = useObjectSearchContext();
|
|
6521
|
-
const formatedContentType = Array.isArray(contentType) ? contentType.join(", ") : contentType;
|
|
6522
|
-
const handleSelectItem = () => {
|
|
6523
|
-
var _a;
|
|
6524
|
-
const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
|
|
6525
|
-
const selectedItem = { id, title, contentType, imageUrl, image, popoverData, ...extraData };
|
|
6526
|
-
if (isMulti) {
|
|
6527
|
-
return onSelectItem(selectedItem);
|
|
6528
|
-
}
|
|
6529
|
-
return onSelectItem([selectedItem]);
|
|
6530
|
-
};
|
|
6531
|
-
const selected = selectedListItems.some((item) => item.id === id);
|
|
6532
|
-
return /* @__PURE__ */ jsxs37(
|
|
6533
|
-
"div",
|
|
6534
|
-
{
|
|
6535
|
-
role: "listitem",
|
|
6536
|
-
css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
|
|
6537
|
-
"data-testid": "list-item",
|
|
6538
|
-
children: [
|
|
6539
|
-
/* @__PURE__ */ jsxs37(
|
|
6540
|
-
"div",
|
|
6541
|
-
{
|
|
6542
|
-
role: "button",
|
|
6543
|
-
onClick: handleSelectItem,
|
|
6544
|
-
css: ObjectListItemControlledContent,
|
|
6545
|
-
"aria-disabled": disabled,
|
|
6546
|
-
children: [
|
|
6547
|
-
!imageUrl ? null : /* @__PURE__ */ jsx62("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectListItemThumbnail }),
|
|
6548
|
-
!image || imageUrl ? null : /* @__PURE__ */ jsx62("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6549
|
-
/* @__PURE__ */ jsxs37("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6550
|
-
!contentType ? null : /* @__PURE__ */ jsx62("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6551
|
-
/* @__PURE__ */ jsx62("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
|
|
6552
|
-
] })
|
|
6553
|
-
]
|
|
6554
|
-
}
|
|
6555
|
-
),
|
|
6556
|
-
/* @__PURE__ */ jsxs37("div", { css: ObjectListItemInfoContainer, children: [
|
|
6557
|
-
selected ? /* @__PURE__ */ jsx62(Chip, { text: "selected", size: "xs" }) : null,
|
|
6558
|
-
!popoverData ? null : /* @__PURE__ */ jsx62(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6559
|
-
] }),
|
|
6560
|
-
!children ? null : /* @__PURE__ */ jsx62("div", { css: ObjectListItemUnControlledContent, children })
|
|
6561
|
-
]
|
|
6562
|
-
}
|
|
6563
|
-
);
|
|
6564
|
-
};
|
|
6565
|
-
var ObjectSearchListItemLoadingSkeleton = () => {
|
|
6566
|
-
return /* @__PURE__ */ jsx62("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
|
|
6567
|
-
};
|
|
6568
|
-
|
|
6569
6616
|
// src/components/ObjectSearch/ObjectSearchResultItem.tsx
|
|
6570
6617
|
import { Badge, Button as Button4, Popover as Popover2 } from "@uniformdev/design-system";
|
|
6571
6618
|
import { format as timeagoFormat } from "timeago.js";
|
|
@@ -6576,8 +6623,8 @@ import { button as button2 } from "@uniformdev/design-system";
|
|
|
6576
6623
|
var ButtonStyles = css34`
|
|
6577
6624
|
${button2}
|
|
6578
6625
|
background: transparent;
|
|
6579
|
-
border: 1px solid var(--
|
|
6580
|
-
color: var(--
|
|
6626
|
+
border: 1px solid var(--typography-base);
|
|
6627
|
+
color: var(--typography-base);
|
|
6581
6628
|
padding: var(--spacing-sm);
|
|
6582
6629
|
font-size: var(--fs-sm);
|
|
6583
6630
|
line-height: 1;
|
|
@@ -6606,14 +6653,14 @@ var ButtonIcon = css34`
|
|
|
6606
6653
|
`;
|
|
6607
6654
|
|
|
6608
6655
|
// src/components/ObjectSearch/ObjectSearchResultItemButton.tsx
|
|
6609
|
-
import { jsx as
|
|
6656
|
+
import { jsx as jsx64, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
|
|
6610
6657
|
var ObjectSearchResultItemButton = ({
|
|
6611
6658
|
text,
|
|
6612
6659
|
icon,
|
|
6613
6660
|
...props
|
|
6614
6661
|
}) => {
|
|
6615
6662
|
return /* @__PURE__ */ jsxs38("button", { type: "button", css: ButtonStyles, ...props, children: [
|
|
6616
|
-
!icon ? null : /* @__PURE__ */
|
|
6663
|
+
!icon ? null : /* @__PURE__ */ jsx64(Image, { src: icon, css: ButtonIcon }),
|
|
6617
6664
|
text
|
|
6618
6665
|
] });
|
|
6619
6666
|
};
|
|
@@ -6623,7 +6670,7 @@ var LinkButton = ({
|
|
|
6623
6670
|
...props
|
|
6624
6671
|
}) => {
|
|
6625
6672
|
return /* @__PURE__ */ jsxs38("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
|
|
6626
|
-
!icon ? null : /* @__PURE__ */
|
|
6673
|
+
!icon ? null : /* @__PURE__ */ jsx64(Image, { src: icon, css: ButtonIcon }),
|
|
6627
6674
|
text
|
|
6628
6675
|
] });
|
|
6629
6676
|
};
|
|
@@ -6663,7 +6710,7 @@ var ObjectSearchResultItemSubtitle = css35`
|
|
|
6663
6710
|
`;
|
|
6664
6711
|
var ObjectSearchResultItemTitle = css35`
|
|
6665
6712
|
align-items: center;
|
|
6666
|
-
color: var(--
|
|
6713
|
+
color: var(--typography-base);
|
|
6667
6714
|
display: flex;
|
|
6668
6715
|
gap: var(--spacing-xs);
|
|
6669
6716
|
`;
|
|
@@ -6689,7 +6736,7 @@ var ObjectSearchImage = css35`
|
|
|
6689
6736
|
`;
|
|
6690
6737
|
|
|
6691
6738
|
// src/components/ObjectSearch/ObjectSearchResultItem.tsx
|
|
6692
|
-
import { jsx as
|
|
6739
|
+
import { jsx as jsx65, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
|
|
6693
6740
|
var ObjectSearchResultItem = ({
|
|
6694
6741
|
id,
|
|
6695
6742
|
title,
|
|
@@ -6713,42 +6760,42 @@ var ObjectSearchResultItem = ({
|
|
|
6713
6760
|
onSelectItem({ id, title: id });
|
|
6714
6761
|
onRemove == null ? void 0 : onRemove();
|
|
6715
6762
|
};
|
|
6716
|
-
return /* @__PURE__ */ jsxs39("div", { css: ObjectSearchResultItemContainer, children: [
|
|
6717
|
-
disableDnD ? null : /* @__PURE__ */
|
|
6718
|
-
/* @__PURE__ */
|
|
6719
|
-
!imageUrl ? null : /* @__PURE__ */
|
|
6763
|
+
return /* @__PURE__ */ jsxs39("div", { css: ObjectSearchResultItemContainer, "data-testid": "search-result-item", children: [
|
|
6764
|
+
disableDnD ? null : /* @__PURE__ */ jsx65("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
|
|
6765
|
+
/* @__PURE__ */ jsx65("div", { children: /* @__PURE__ */ jsxs39("div", { css: ObjectSearchContentContainer, children: [
|
|
6766
|
+
!imageUrl ? null : /* @__PURE__ */ jsx65("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectSearchImage }),
|
|
6720
6767
|
/* @__PURE__ */ jsxs39("div", { children: [
|
|
6721
|
-
/* @__PURE__ */
|
|
6722
|
-
/* @__PURE__ */ jsxs39("span", { role: "heading", css: ObjectSearchResultItemTitle, children: [
|
|
6768
|
+
/* @__PURE__ */ jsx65("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
|
|
6769
|
+
/* @__PURE__ */ jsxs39("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
|
|
6723
6770
|
title != null ? title : name,
|
|
6724
|
-
!popoverData ? null : /* @__PURE__ */
|
|
6771
|
+
!popoverData ? null : /* @__PURE__ */ jsx65(Popover2, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
|
|
6725
6772
|
] }),
|
|
6726
6773
|
!createdAt && !publishStatus ? null : /* @__PURE__ */ jsxs39("div", { css: ObjectSearchAuthorStateGroup, children: [
|
|
6727
|
-
!(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */
|
|
6774
|
+
!(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ jsx65(Badge, { ...publishStatus, size: "sm", uppercaseText: true }),
|
|
6728
6775
|
!createdAt && !publishedAt ? null : /* @__PURE__ */ jsxs39("div", { css: ObjectSearchUpdateGroup, children: [
|
|
6729
6776
|
!createdAt ? null : /* @__PURE__ */ jsxs39("small", { css: ObjectSearchResultItemTimeStamp, children: [
|
|
6730
|
-
/* @__PURE__ */
|
|
6777
|
+
/* @__PURE__ */ jsx65("strong", { children: "Last updated: " }),
|
|
6731
6778
|
timeagoFormat(createdAt)
|
|
6732
6779
|
] }),
|
|
6733
6780
|
!publishedAt ? null : /* @__PURE__ */ jsxs39("small", { css: ObjectSearchResultItemTimeStamp, children: [
|
|
6734
|
-
/* @__PURE__ */
|
|
6781
|
+
/* @__PURE__ */ jsx65("strong", { children: "Last published: " }),
|
|
6735
6782
|
timeagoFormat(publishedAt)
|
|
6736
6783
|
] })
|
|
6737
6784
|
] })
|
|
6738
6785
|
] }),
|
|
6739
|
-
/* @__PURE__ */
|
|
6786
|
+
/* @__PURE__ */ jsx65("div", { children })
|
|
6740
6787
|
] })
|
|
6741
6788
|
] }) }),
|
|
6742
6789
|
!editLink && hideRemoveButton ? null : /* @__PURE__ */ jsxs39("div", { css: ObjectSearchAuthorStateGroup, children: [
|
|
6743
|
-
!editLink ? null : /* @__PURE__ */
|
|
6744
|
-
hideRemoveButton ? null : /* @__PURE__ */
|
|
6790
|
+
!editLink ? null : /* @__PURE__ */ jsx65(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
|
|
6791
|
+
hideRemoveButton ? null : /* @__PURE__ */ jsx65(Button4, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
|
|
6745
6792
|
] })
|
|
6746
6793
|
] });
|
|
6747
6794
|
};
|
|
6748
6795
|
|
|
6749
6796
|
// src/components/ObjectSearch/ObjectSearchResultList.tsx
|
|
6750
6797
|
import { Button as Button5, Counter } from "@uniformdev/design-system";
|
|
6751
|
-
import {
|
|
6798
|
+
import { Draggable as Draggable3, Droppable as Droppable3 } from "react-beautiful-dnd";
|
|
6752
6799
|
|
|
6753
6800
|
// src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
|
|
6754
6801
|
import { css as css36 } from "@emotion/react";
|
|
@@ -6776,16 +6823,17 @@ var ObjectSearchResultListTitle = css36`
|
|
|
6776
6823
|
`;
|
|
6777
6824
|
|
|
6778
6825
|
// src/components/ObjectSearch/ObjectSearchResultList.tsx
|
|
6779
|
-
import { Fragment as Fragment13, jsx as
|
|
6826
|
+
import { Fragment as Fragment13, jsx as jsx66, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
|
|
6780
6827
|
function ObjectSearchResultList({
|
|
6781
6828
|
resultLabelText = "Selected",
|
|
6782
6829
|
removeButtonText = "Remove all",
|
|
6783
6830
|
onRemoveAllSelected,
|
|
6784
6831
|
hideRemoveButton = false,
|
|
6785
6832
|
additionalButtons,
|
|
6786
|
-
renderResultComponent = (value) => /* @__PURE__ */
|
|
6833
|
+
renderResultComponent = (value) => /* @__PURE__ */ jsx66(ObjectSearchResultItem, { ...value }),
|
|
6787
6834
|
multiSelectId,
|
|
6788
6835
|
disableDnD = false,
|
|
6836
|
+
getContainerForDnDReparenting,
|
|
6789
6837
|
whenNothingSelected = null
|
|
6790
6838
|
}) {
|
|
6791
6839
|
const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useObjectSearchContext();
|
|
@@ -6803,16 +6851,37 @@ function ObjectSearchResultList({
|
|
|
6803
6851
|
return result;
|
|
6804
6852
|
}
|
|
6805
6853
|
};
|
|
6854
|
+
const getDraggableItem = (provided, snapshot, rubric) => {
|
|
6855
|
+
const item = selectedListItems.find((i) => i.id === rubric.draggableId);
|
|
6856
|
+
const renderListItem = renderResultComponent({
|
|
6857
|
+
...item,
|
|
6858
|
+
disableDnD: selectedListItems.length === 1 || disableDnD
|
|
6859
|
+
});
|
|
6860
|
+
return /* @__PURE__ */ jsx66(
|
|
6861
|
+
"div",
|
|
6862
|
+
{
|
|
6863
|
+
css: [
|
|
6864
|
+
ObjectSearchDragContainer,
|
|
6865
|
+
snapshot.isDragging ? ObjectSearchContainerDragging : void 0
|
|
6866
|
+
],
|
|
6867
|
+
ref: provided.innerRef,
|
|
6868
|
+
"data-dragging": snapshot.isDragging,
|
|
6869
|
+
...provided.draggableProps,
|
|
6870
|
+
...provided.dragHandleProps,
|
|
6871
|
+
children: renderListItem
|
|
6872
|
+
}
|
|
6873
|
+
);
|
|
6874
|
+
};
|
|
6806
6875
|
return /* @__PURE__ */ jsxs40(Fragment13, { children: [
|
|
6807
6876
|
/* @__PURE__ */ jsxs40("div", { role: "group", css: ObjectSearchResultListContainer, children: [
|
|
6808
6877
|
/* @__PURE__ */ jsxs40("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
|
|
6809
|
-
/* @__PURE__ */
|
|
6878
|
+
/* @__PURE__ */ jsx66("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
|
|
6810
6879
|
" ",
|
|
6811
|
-
!selectedListItems.length ? null : /* @__PURE__ */
|
|
6880
|
+
!selectedListItems.length ? null : /* @__PURE__ */ jsx66(Counter, { count: selectedListItems.length })
|
|
6812
6881
|
] }),
|
|
6813
6882
|
/* @__PURE__ */ jsxs40("div", { css: ObjectSearchResultListCounterContainer, children: [
|
|
6814
6883
|
additionalButtons,
|
|
6815
|
-
hideRemoveButton ? null : /* @__PURE__ */
|
|
6884
|
+
hideRemoveButton ? null : /* @__PURE__ */ jsx66(
|
|
6816
6885
|
Button5,
|
|
6817
6886
|
{
|
|
6818
6887
|
buttonType: "ghostDestructive",
|
|
@@ -6824,43 +6893,36 @@ function ObjectSearchResultList({
|
|
|
6824
6893
|
)
|
|
6825
6894
|
] })
|
|
6826
6895
|
] }),
|
|
6827
|
-
!selectedListItems.length ? whenNothingSelected : /* @__PURE__ */
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
children: (provided2, snapshot) => /* @__PURE__ */ jsx65(
|
|
6838
|
-
"div",
|
|
6896
|
+
!selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ jsx66(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx66(
|
|
6897
|
+
Droppable3,
|
|
6898
|
+
{
|
|
6899
|
+
droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
|
|
6900
|
+
renderClone: getContainerForDnDReparenting ? getDraggableItem : void 0,
|
|
6901
|
+
getContainerForClone: getContainerForDnDReparenting,
|
|
6902
|
+
children: (provided) => /* @__PURE__ */ jsxs40("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
|
|
6903
|
+
selectedListItems.map((item, i) => {
|
|
6904
|
+
return /* @__PURE__ */ jsx66(
|
|
6905
|
+
Draggable3,
|
|
6839
6906
|
{
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
item.id
|
|
6853
|
-
);
|
|
6854
|
-
}),
|
|
6855
|
-
provided.placeholder
|
|
6856
|
-
] }) }) })
|
|
6907
|
+
draggableId: item.id,
|
|
6908
|
+
index: i,
|
|
6909
|
+
isDragDisabled: selectedListItems.length === 1 || disableDnD,
|
|
6910
|
+
children: getDraggableItem
|
|
6911
|
+
},
|
|
6912
|
+
item.id
|
|
6913
|
+
);
|
|
6914
|
+
}),
|
|
6915
|
+
provided.placeholder
|
|
6916
|
+
] })
|
|
6917
|
+
}
|
|
6918
|
+
) })
|
|
6857
6919
|
] });
|
|
6858
6920
|
}
|
|
6859
6921
|
|
|
6860
6922
|
// src/components/ObjectSearch/QueryFilter.tsx
|
|
6861
6923
|
import { Input as Input5, InputKeywordSearch as InputKeywordSearch3, InputSelect as InputSelect7, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
|
|
6862
|
-
import { useEffect as useEffect16, useState as
|
|
6863
|
-
import { jsx as
|
|
6924
|
+
import { useEffect as useEffect16, useState as useState18 } from "react";
|
|
6925
|
+
import { jsx as jsx67, jsxs as jsxs41 } from "@emotion/react/jsx-runtime";
|
|
6864
6926
|
var QueryFilter = ({
|
|
6865
6927
|
requireContentType,
|
|
6866
6928
|
queryFilterTitle = "Configure Query",
|
|
@@ -6889,14 +6951,14 @@ var QueryFilter = ({
|
|
|
6889
6951
|
],
|
|
6890
6952
|
children
|
|
6891
6953
|
}) => {
|
|
6892
|
-
var _a, _b, _c, _d;
|
|
6954
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6893
6955
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
6894
|
-
const [queryState, setQueryState] =
|
|
6895
|
-
contentType: "",
|
|
6896
|
-
keyword: "",
|
|
6956
|
+
const [queryState, setQueryState] = useState18({
|
|
6957
|
+
contentType: (_a = query.contentType) != null ? _a : "",
|
|
6958
|
+
keyword: (_b = query.contentType) != null ? _b : "",
|
|
6897
6959
|
count: countValue != null ? countValue : 5,
|
|
6898
|
-
sortBy: (
|
|
6899
|
-
sortOrder: (
|
|
6960
|
+
sortBy: (_c = sortOptions[0].id) != null ? _c : "",
|
|
6961
|
+
sortOrder: (_d = sortOrderOptions[0].id) != null ? _d : ""
|
|
6900
6962
|
});
|
|
6901
6963
|
const handleFilterChange = (value) => {
|
|
6902
6964
|
setQueryState((prev) => ({ ...prev, ...value }));
|
|
@@ -6906,17 +6968,17 @@ var QueryFilter = ({
|
|
|
6906
6968
|
onSetQuery(queryState);
|
|
6907
6969
|
}, [onSetQuery, queryState]);
|
|
6908
6970
|
return /* @__PURE__ */ jsxs41("fieldset", { children: [
|
|
6909
|
-
/* @__PURE__ */
|
|
6910
|
-
/* @__PURE__ */
|
|
6911
|
-
/* @__PURE__ */
|
|
6971
|
+
/* @__PURE__ */ jsx67("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
|
|
6972
|
+
/* @__PURE__ */ jsx67("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ jsxs41(VerticalRhythm3, { children: [
|
|
6973
|
+
/* @__PURE__ */ jsx67(
|
|
6912
6974
|
InputVariables,
|
|
6913
6975
|
{
|
|
6914
6976
|
label: searchInputLabel,
|
|
6915
|
-
value: (
|
|
6977
|
+
value: (_e = queryState.keyword) != null ? _e : "",
|
|
6916
6978
|
onChange: (newQuery) => handleFilterChange({ keyword: newQuery }),
|
|
6917
6979
|
disableInlineMenu: true,
|
|
6918
6980
|
id: "qf_searchText",
|
|
6919
|
-
inputWhenNoVariables: /* @__PURE__ */
|
|
6981
|
+
inputWhenNoVariables: /* @__PURE__ */ jsx67(
|
|
6920
6982
|
InputKeywordSearch3,
|
|
6921
6983
|
{
|
|
6922
6984
|
id: "qf_searchText",
|
|
@@ -6931,15 +6993,15 @@ var QueryFilter = ({
|
|
|
6931
6993
|
}
|
|
6932
6994
|
),
|
|
6933
6995
|
/* @__PURE__ */ jsxs41("div", { css: ObjectSearchFilterGrid("1fr 100px"), children: [
|
|
6934
|
-
/* @__PURE__ */
|
|
6996
|
+
/* @__PURE__ */ jsx67(
|
|
6935
6997
|
InputVariables,
|
|
6936
6998
|
{
|
|
6937
6999
|
label: contentTypeLabel,
|
|
6938
7000
|
id: "qf_contentType",
|
|
6939
|
-
value: (
|
|
7001
|
+
value: (_f = queryState.contentType) != null ? _f : "",
|
|
6940
7002
|
onChange: (newType) => handleFilterChange({ contentType: newType }),
|
|
6941
7003
|
disableInlineMenu: true,
|
|
6942
|
-
inputWhenNoVariables: /* @__PURE__ */
|
|
7004
|
+
inputWhenNoVariables: /* @__PURE__ */ jsx67(
|
|
6943
7005
|
InputSelect7,
|
|
6944
7006
|
{
|
|
6945
7007
|
id: "qf_contentType",
|
|
@@ -6958,7 +7020,7 @@ var QueryFilter = ({
|
|
|
6958
7020
|
)
|
|
6959
7021
|
}
|
|
6960
7022
|
),
|
|
6961
|
-
/* @__PURE__ */
|
|
7023
|
+
/* @__PURE__ */ jsx67(
|
|
6962
7024
|
InputVariables,
|
|
6963
7025
|
{
|
|
6964
7026
|
label: countLabel,
|
|
@@ -6966,7 +7028,7 @@ var QueryFilter = ({
|
|
|
6966
7028
|
value: queryState.count.toString(10),
|
|
6967
7029
|
onChange: (newCount) => handleFilterChange({ count: newCount }),
|
|
6968
7030
|
disableInlineMenu: true,
|
|
6969
|
-
inputWhenNoVariables: /* @__PURE__ */
|
|
7031
|
+
inputWhenNoVariables: /* @__PURE__ */ jsx67(
|
|
6970
7032
|
Input5,
|
|
6971
7033
|
{
|
|
6972
7034
|
id: "qf_count",
|
|
@@ -6982,7 +7044,7 @@ var QueryFilter = ({
|
|
|
6982
7044
|
)
|
|
6983
7045
|
] }),
|
|
6984
7046
|
/* @__PURE__ */ jsxs41("div", { css: ObjectSearchFilterGrid("2fr 1fr"), children: [
|
|
6985
|
-
/* @__PURE__ */
|
|
7047
|
+
/* @__PURE__ */ jsx67(
|
|
6986
7048
|
InputVariables,
|
|
6987
7049
|
{
|
|
6988
7050
|
id: "qf_sortBy",
|
|
@@ -6990,7 +7052,7 @@ var QueryFilter = ({
|
|
|
6990
7052
|
value: queryState.sortBy,
|
|
6991
7053
|
onChange: (newSortBy) => handleFilterChange({ sortBy: newSortBy }),
|
|
6992
7054
|
disableInlineMenu: true,
|
|
6993
|
-
inputWhenNoVariables: /* @__PURE__ */
|
|
7055
|
+
inputWhenNoVariables: /* @__PURE__ */ jsx67(
|
|
6994
7056
|
InputSelect7,
|
|
6995
7057
|
{
|
|
6996
7058
|
label: sortLabel,
|
|
@@ -7012,7 +7074,7 @@ var QueryFilter = ({
|
|
|
7012
7074
|
)
|
|
7013
7075
|
}
|
|
7014
7076
|
),
|
|
7015
|
-
/* @__PURE__ */
|
|
7077
|
+
/* @__PURE__ */ jsx67(
|
|
7016
7078
|
InputVariables,
|
|
7017
7079
|
{
|
|
7018
7080
|
label: sortOrderLabel,
|
|
@@ -7020,7 +7082,7 @@ var QueryFilter = ({
|
|
|
7020
7082
|
value: queryState.sortOrder,
|
|
7021
7083
|
onChange: (newSort) => handleFilterChange({ sortOrder: newSort }),
|
|
7022
7084
|
disableInlineMenu: true,
|
|
7023
|
-
inputWhenNoVariables: /* @__PURE__ */
|
|
7085
|
+
inputWhenNoVariables: /* @__PURE__ */ jsx67(
|
|
7024
7086
|
InputSelect7,
|
|
7025
7087
|
{
|
|
7026
7088
|
label: sortOrderLabel,
|
|
@@ -7046,7 +7108,7 @@ var QueryFilter = ({
|
|
|
7046
7108
|
|
|
7047
7109
|
// src/components/ParamTypeDynamicDataProvider.tsx
|
|
7048
7110
|
import { useEffect as useEffect17, useMemo as useMemo16, useRef as useRef15 } from "react";
|
|
7049
|
-
import { jsx as
|
|
7111
|
+
import { jsx as jsx68 } from "@emotion/react/jsx-runtime";
|
|
7050
7112
|
function ParamTypeDynamicDataProvider(props) {
|
|
7051
7113
|
const { children } = props;
|
|
7052
7114
|
const {
|
|
@@ -7058,7 +7120,7 @@ function ParamTypeDynamicDataProvider(props) {
|
|
|
7058
7120
|
() => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
|
|
7059
7121
|
[dynamicInputsAsVariables, connectedDataAsVariables]
|
|
7060
7122
|
);
|
|
7061
|
-
return /* @__PURE__ */
|
|
7123
|
+
return /* @__PURE__ */ jsx68(VariablesProvider, { value: variables, onChange: () => {
|
|
7062
7124
|
}, editVariableComponent: JsonMeshVariableEditor, children });
|
|
7063
7125
|
}
|
|
7064
7126
|
var JsonMeshVariableEditor = ({
|
|
@@ -7105,11 +7167,33 @@ function createLocationValidator(setValue, validate) {
|
|
|
7105
7167
|
});
|
|
7106
7168
|
}
|
|
7107
7169
|
|
|
7170
|
+
// src/utils/useContentDataResourceLocaleInfo.ts
|
|
7171
|
+
import { bindVariables as bindVariables2, createVariableReference as createVariableReference4, LOCALE_DYNAMIC_INPUT_NAME as LOCALE_DYNAMIC_INPUT_NAME2 } from "@uniformdev/canvas";
|
|
7172
|
+
import { useEffect as useEffect18, useRef as useRef16 } from "react";
|
|
7173
|
+
function useContentDataResourceLocaleInfo({
|
|
7174
|
+
locale,
|
|
7175
|
+
setLocale,
|
|
7176
|
+
dynamicInputs
|
|
7177
|
+
}) {
|
|
7178
|
+
var _a;
|
|
7179
|
+
const setLocaleRef = useRef16(setLocale);
|
|
7180
|
+
setLocaleRef.current = setLocale;
|
|
7181
|
+
const { flatVariables } = useVariables();
|
|
7182
|
+
const effectiveLocale = locale != null ? locale : dynamicInputs[LOCALE_DYNAMIC_INPUT_NAME2] ? createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2) : "";
|
|
7183
|
+
const boundLocale = (_a = bindVariables2({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
|
|
7184
|
+
useEffect18(() => {
|
|
7185
|
+
if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
|
|
7186
|
+
setLocaleRef.current(createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2));
|
|
7187
|
+
}
|
|
7188
|
+
}, [locale, effectiveLocale]);
|
|
7189
|
+
return { effectiveLocale, boundLocale: boundLocale ? boundLocale : void 0 };
|
|
7190
|
+
}
|
|
7191
|
+
|
|
7108
7192
|
// src/index.ts
|
|
7109
7193
|
import {
|
|
7110
7194
|
AddListButton as AddListButton2,
|
|
7111
7195
|
Button as Button6,
|
|
7112
|
-
Callout as
|
|
7196
|
+
Callout as Callout6,
|
|
7113
7197
|
DrawerContent,
|
|
7114
7198
|
Heading,
|
|
7115
7199
|
Input as Input6,
|
|
@@ -7148,7 +7232,7 @@ export {
|
|
|
7148
7232
|
$isVariableNode,
|
|
7149
7233
|
AddListButton2 as AddListButton,
|
|
7150
7234
|
Button6 as Button,
|
|
7151
|
-
|
|
7235
|
+
Callout6 as Callout,
|
|
7152
7236
|
ControlledValuePlugin,
|
|
7153
7237
|
DISCONNECT_VARIABLE_COMMAND,
|
|
7154
7238
|
DamSelectedItem,
|
|
@@ -7308,6 +7392,7 @@ export {
|
|
|
7308
7392
|
urlEncodeRequestParameter,
|
|
7309
7393
|
urlEncodeRequestUrl,
|
|
7310
7394
|
useConnectedDataAsVariables,
|
|
7395
|
+
useContentDataResourceLocaleInfo,
|
|
7311
7396
|
useDynamicInputsAsVariables,
|
|
7312
7397
|
useMeshLocation,
|
|
7313
7398
|
useObjectSearchContext,
|