@uniformdev/mesh-sdk-react 19.186.2-alpha.14 → 19.186.4-alpha.29
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 +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.esm.js +32 -16
- package/dist/index.js +30 -14
- package/dist/index.mjs +32 -16
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes } from 'react';
|
|
3
|
+
import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
4
4
|
import { TDate } from 'timeago.js';
|
|
5
5
|
import * as _emotion_react from '@emotion/react';
|
|
6
6
|
import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
|
|
@@ -1997,12 +1997,14 @@ type FilterButtonProps = {
|
|
|
1997
1997
|
hasSelectedValue?: boolean;
|
|
1998
1998
|
/** sets the data-testid attribute on the button */
|
|
1999
1999
|
dataTestId?: string;
|
|
2000
|
-
|
|
2000
|
+
/** sets whether to show the dropdown icon, we do not recommend using this option when filterCount is enabled */
|
|
2001
|
+
showDropdownIcon?: boolean;
|
|
2002
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
2001
2003
|
/**
|
|
2002
2004
|
* @deprecated beta - A filter button component used to display filter menu options
|
|
2003
2005
|
* @example <FilterButton text="Filters" filterCount={3} />
|
|
2004
2006
|
*/
|
|
2005
|
-
declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2007
|
+
declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, showDropdownIcon, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2006
2008
|
|
|
2007
2009
|
/**
|
|
2008
2010
|
* @deprecated beta - Default filter controls for search and filter
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes } from 'react';
|
|
3
|
+
import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
4
4
|
import { TDate } from 'timeago.js';
|
|
5
5
|
import * as _emotion_react from '@emotion/react';
|
|
6
6
|
import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
|
|
@@ -1997,12 +1997,14 @@ type FilterButtonProps = {
|
|
|
1997
1997
|
hasSelectedValue?: boolean;
|
|
1998
1998
|
/** sets the data-testid attribute on the button */
|
|
1999
1999
|
dataTestId?: string;
|
|
2000
|
-
|
|
2000
|
+
/** sets whether to show the dropdown icon, we do not recommend using this option when filterCount is enabled */
|
|
2001
|
+
showDropdownIcon?: boolean;
|
|
2002
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
2001
2003
|
/**
|
|
2002
2004
|
* @deprecated beta - A filter button component used to display filter menu options
|
|
2003
2005
|
* @example <FilterButton text="Filters" filterCount={3} />
|
|
2004
2006
|
*/
|
|
2005
|
-
declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2007
|
+
declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, showDropdownIcon, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2006
2008
|
|
|
2007
2009
|
/**
|
|
2008
2010
|
* @deprecated beta - Default filter controls for search and filter
|
package/dist/index.esm.js
CHANGED
|
@@ -2813,7 +2813,9 @@ function serializeVariablesEditorState(editorState) {
|
|
|
2813
2813
|
}
|
|
2814
2814
|
function serializeVariablesEditorSerializedState(serializedEditorState) {
|
|
2815
2815
|
const buf = [];
|
|
2816
|
-
|
|
2816
|
+
if (serializedEditorState) {
|
|
2817
|
+
serializeRecursive(serializedEditorState, buf);
|
|
2818
|
+
}
|
|
2817
2819
|
const result = buf.join("");
|
|
2818
2820
|
return result.length > 0 ? result : void 0;
|
|
2819
2821
|
}
|
|
@@ -2829,6 +2831,9 @@ function serializeRecursive(node, buffer) {
|
|
|
2829
2831
|
}
|
|
2830
2832
|
if ("children" in node && node.children) {
|
|
2831
2833
|
for (const child of node.children) {
|
|
2834
|
+
if (!child) {
|
|
2835
|
+
continue;
|
|
2836
|
+
}
|
|
2832
2837
|
serializeRecursive(child, buffer);
|
|
2833
2838
|
}
|
|
2834
2839
|
}
|
|
@@ -5266,6 +5271,7 @@ function hasReferencedVariables2(value) {
|
|
|
5266
5271
|
|
|
5267
5272
|
// src/components/Variables/VariablesList.tsx
|
|
5268
5273
|
import { css as css27 } from "@emotion/react";
|
|
5274
|
+
import { CgTrash } from "@react-icons/all-files/cg/CgTrash";
|
|
5269
5275
|
import {
|
|
5270
5276
|
AddListButton,
|
|
5271
5277
|
button,
|
|
@@ -5400,7 +5406,7 @@ function VariablesList() {
|
|
|
5400
5406
|
],
|
|
5401
5407
|
"aria-controls": text,
|
|
5402
5408
|
onClick: () => dispatch({ type: "remove", variable: name }),
|
|
5403
|
-
children: /* @__PURE__ */ jsx44(Icon5, { icon:
|
|
5409
|
+
children: /* @__PURE__ */ jsx44(Icon5, { icon: CgTrash, iconColor: "red" })
|
|
5404
5410
|
}
|
|
5405
5411
|
) })
|
|
5406
5412
|
]
|
|
@@ -6323,7 +6329,7 @@ var DataRefreshButton = ({
|
|
|
6323
6329
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
6324
6330
|
import { css as css33 } from "@emotion/react";
|
|
6325
6331
|
import { bindVariables } from "@uniformdev/canvas";
|
|
6326
|
-
import { Callout as Callout5, Container,
|
|
6332
|
+
import { Callout as Callout5, Container, ScrollableList, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
|
|
6327
6333
|
|
|
6328
6334
|
// src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
|
|
6329
6335
|
import { bindVariablesToObject as bindVariablesToObject2 } from "@uniformdev/canvas";
|
|
@@ -6642,7 +6648,7 @@ var ObjectSearchContainer = ({
|
|
|
6642
6648
|
}
|
|
6643
6649
|
]);
|
|
6644
6650
|
};
|
|
6645
|
-
return /* @__PURE__ */
|
|
6651
|
+
return /* @__PURE__ */ jsxs35(VerticalRhythm3, { children: [
|
|
6646
6652
|
/* @__PURE__ */ jsx61(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx61(
|
|
6647
6653
|
InputVariables,
|
|
6648
6654
|
{
|
|
@@ -6659,7 +6665,7 @@ var ObjectSearchContainer = ({
|
|
|
6659
6665
|
}
|
|
6660
6666
|
) : body }),
|
|
6661
6667
|
children
|
|
6662
|
-
] })
|
|
6668
|
+
] });
|
|
6663
6669
|
};
|
|
6664
6670
|
var DefaultResultList = () => {
|
|
6665
6671
|
var _a;
|
|
@@ -8323,7 +8329,7 @@ var TextMultiChoiceEditor = ({
|
|
|
8323
8329
|
};
|
|
8324
8330
|
|
|
8325
8331
|
// src/components/SearchAndFilter/FilterButton.tsx
|
|
8326
|
-
import { Counter as Counter2, Icon as Icon6 } from "@uniformdev/design-system";
|
|
8332
|
+
import { Counter as Counter2, customIcons, Icon as Icon6 } from "@uniformdev/design-system";
|
|
8327
8333
|
|
|
8328
8334
|
// src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
|
|
8329
8335
|
import { css as css38 } from "@emotion/react";
|
|
@@ -8574,15 +8580,26 @@ var SearchAndFilterButtonGroup = css38`
|
|
|
8574
8580
|
margin-top: var(--spacing-xs);
|
|
8575
8581
|
margin-left: calc(56px + var(--spacing-md));
|
|
8576
8582
|
`;
|
|
8583
|
+
var SearchAndFilterAdditionalContainer = css38`
|
|
8584
|
+
align-items: center;
|
|
8585
|
+
border-top: 1px solid var(--gray-300);
|
|
8586
|
+
display: flex;
|
|
8587
|
+
flex-wrap: nowrap;
|
|
8588
|
+
gap: var(--spacing-base);
|
|
8589
|
+
padding: var(--spacing-base) var(--spacing-md) 0;
|
|
8590
|
+
position: relative;
|
|
8591
|
+
z-index: 0;
|
|
8592
|
+
`;
|
|
8577
8593
|
|
|
8578
8594
|
// src/components/SearchAndFilter/FilterButton.tsx
|
|
8579
8595
|
import { jsx as jsx81, jsxs as jsxs44 } from "@emotion/react/jsx-runtime";
|
|
8580
8596
|
var FilterButton2 = ({
|
|
8581
8597
|
text = "Filters",
|
|
8582
|
-
icon = "filter-add",
|
|
8598
|
+
icon = customIcons["filter-add"],
|
|
8583
8599
|
filterCount,
|
|
8584
8600
|
hasSelectedValue,
|
|
8585
8601
|
dataTestId,
|
|
8602
|
+
showDropdownIcon,
|
|
8586
8603
|
...props
|
|
8587
8604
|
}) => {
|
|
8588
8605
|
return /* @__PURE__ */ jsxs44(
|
|
@@ -8599,7 +8616,8 @@ var FilterButton2 = ({
|
|
|
8599
8616
|
children: [
|
|
8600
8617
|
/* @__PURE__ */ jsx81(Icon6, { icon, iconColor: "currentColor", size: "1rem" }),
|
|
8601
8618
|
/* @__PURE__ */ jsx81("span", { css: FilterButtonText, children: text }),
|
|
8602
|
-
filterCount ? /* @__PURE__ */ jsx81(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null
|
|
8619
|
+
filterCount ? /* @__PURE__ */ jsx81(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null,
|
|
8620
|
+
showDropdownIcon ? /* @__PURE__ */ jsx81(Icon6, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
|
|
8603
8621
|
]
|
|
8604
8622
|
}
|
|
8605
8623
|
);
|
|
@@ -8906,6 +8924,7 @@ var FilterControls = ({
|
|
|
8906
8924
|
};
|
|
8907
8925
|
|
|
8908
8926
|
// src/components/SearchAndFilter/FilterItem.tsx
|
|
8927
|
+
import { CgTrash as CgTrash2 } from "@react-icons/all-files/cg/CgTrash";
|
|
8909
8928
|
import { Icon as Icon8, InputComboBox as InputComboBox5 } from "@uniformdev/design-system";
|
|
8910
8929
|
import { useMemo as useMemo23 } from "react";
|
|
8911
8930
|
|
|
@@ -9051,7 +9070,7 @@ var FilterItem = ({
|
|
|
9051
9070
|
css: IconBtn,
|
|
9052
9071
|
"data-testid": "delete-filter",
|
|
9053
9072
|
disabled: filters.length === 1,
|
|
9054
|
-
children: /* @__PURE__ */ jsx85(Icon8, { icon:
|
|
9073
|
+
children: /* @__PURE__ */ jsx85(Icon8, { icon: CgTrash2, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
|
|
9055
9074
|
}
|
|
9056
9075
|
)
|
|
9057
9076
|
] })
|
|
@@ -9059,6 +9078,7 @@ var FilterItem = ({
|
|
|
9059
9078
|
};
|
|
9060
9079
|
|
|
9061
9080
|
// src/components/SearchAndFilter/FilterItems.tsx
|
|
9081
|
+
import { CgMathPlus } from "@react-icons/all-files/cg/CgMathPlus";
|
|
9062
9082
|
import { Icon as Icon9 } from "@uniformdev/design-system";
|
|
9063
9083
|
|
|
9064
9084
|
// src/components/SearchAndFilter/FilterMenu.tsx
|
|
@@ -9082,7 +9102,7 @@ var SearchAndFilterOptionsContainer2 = ({
|
|
|
9082
9102
|
children: buttonRow
|
|
9083
9103
|
}
|
|
9084
9104
|
) : null,
|
|
9085
|
-
additionalFiltersContainer ? /* @__PURE__ */ jsx86("div", { children: additionalFiltersContainer }) : null
|
|
9105
|
+
additionalFiltersContainer ? /* @__PURE__ */ jsx86("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
|
|
9086
9106
|
] });
|
|
9087
9107
|
};
|
|
9088
9108
|
var FilterMenu = ({
|
|
@@ -9271,7 +9291,7 @@ var FilterItems = ({
|
|
|
9271
9291
|
onClick: handleAddFilter,
|
|
9272
9292
|
"data-testid": "add-filter",
|
|
9273
9293
|
children: [
|
|
9274
|
-
/* @__PURE__ */ jsx87(Icon9, { icon:
|
|
9294
|
+
/* @__PURE__ */ jsx87(Icon9, { icon: CgMathPlus, iconColor: "currentColor", size: "1rem" }),
|
|
9275
9295
|
addButtonText
|
|
9276
9296
|
]
|
|
9277
9297
|
}
|
|
@@ -9666,13 +9686,9 @@ var SearchAndFilterButtonGroup2 = css39`
|
|
|
9666
9686
|
`;
|
|
9667
9687
|
var SortFilterWrapper = (hiddenLocaleInput) => css39`
|
|
9668
9688
|
align-items: center;
|
|
9669
|
-
border-top: 1px solid var(--gray-300);
|
|
9670
9689
|
display: flex;
|
|
9671
|
-
flex-wrap: wrap;
|
|
9672
9690
|
gap: var(--spacing-base);
|
|
9673
|
-
|
|
9674
|
-
position: relative;
|
|
9675
|
-
z-index: 0;
|
|
9691
|
+
flex-grow: 1;
|
|
9676
9692
|
|
|
9677
9693
|
${cq2("420px")} {
|
|
9678
9694
|
display: grid;
|
package/dist/index.js
CHANGED
|
@@ -3055,7 +3055,9 @@ function serializeVariablesEditorState(editorState) {
|
|
|
3055
3055
|
}
|
|
3056
3056
|
function serializeVariablesEditorSerializedState(serializedEditorState) {
|
|
3057
3057
|
const buf = [];
|
|
3058
|
-
|
|
3058
|
+
if (serializedEditorState) {
|
|
3059
|
+
serializeRecursive(serializedEditorState, buf);
|
|
3060
|
+
}
|
|
3059
3061
|
const result = buf.join("");
|
|
3060
3062
|
return result.length > 0 ? result : void 0;
|
|
3061
3063
|
}
|
|
@@ -3071,6 +3073,9 @@ function serializeRecursive(node, buffer) {
|
|
|
3071
3073
|
}
|
|
3072
3074
|
if ("children" in node && node.children) {
|
|
3073
3075
|
for (const child of node.children) {
|
|
3076
|
+
if (!child) {
|
|
3077
|
+
continue;
|
|
3078
|
+
}
|
|
3074
3079
|
serializeRecursive(child, buffer);
|
|
3075
3080
|
}
|
|
3076
3081
|
}
|
|
@@ -5461,6 +5466,7 @@ function hasReferencedVariables2(value) {
|
|
|
5461
5466
|
|
|
5462
5467
|
// src/components/Variables/VariablesList.tsx
|
|
5463
5468
|
var import_react58 = require("@emotion/react");
|
|
5469
|
+
var import_CgTrash = require("@react-icons/all-files/cg/CgTrash");
|
|
5464
5470
|
var import_design_system25 = require("@uniformdev/design-system");
|
|
5465
5471
|
var import_react_beautiful_dnd3 = require("react-beautiful-dnd");
|
|
5466
5472
|
|
|
@@ -5585,7 +5591,7 @@ function VariablesList() {
|
|
|
5585
5591
|
],
|
|
5586
5592
|
"aria-controls": text,
|
|
5587
5593
|
onClick: () => dispatch({ type: "remove", variable: name }),
|
|
5588
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_design_system25.Icon, { icon:
|
|
5594
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_design_system25.Icon, { icon: import_CgTrash.CgTrash, iconColor: "red" })
|
|
5589
5595
|
}
|
|
5590
5596
|
) })
|
|
5591
5597
|
]
|
|
@@ -6800,7 +6806,7 @@ var ObjectSearchContainer = ({
|
|
|
6800
6806
|
}
|
|
6801
6807
|
]);
|
|
6802
6808
|
};
|
|
6803
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.
|
|
6809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_design_system35.VerticalRhythm, { children: [
|
|
6804
6810
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_design_system35.Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
6805
6811
|
InputVariables,
|
|
6806
6812
|
{
|
|
@@ -6817,7 +6823,7 @@ var ObjectSearchContainer = ({
|
|
|
6817
6823
|
}
|
|
6818
6824
|
) : body }),
|
|
6819
6825
|
children
|
|
6820
|
-
] })
|
|
6826
|
+
] });
|
|
6821
6827
|
};
|
|
6822
6828
|
var DefaultResultList = () => {
|
|
6823
6829
|
var _a;
|
|
@@ -8714,15 +8720,26 @@ var SearchAndFilterButtonGroup = import_react86.css`
|
|
|
8714
8720
|
margin-top: var(--spacing-xs);
|
|
8715
8721
|
margin-left: calc(56px + var(--spacing-md));
|
|
8716
8722
|
`;
|
|
8723
|
+
var SearchAndFilterAdditionalContainer = import_react86.css`
|
|
8724
|
+
align-items: center;
|
|
8725
|
+
border-top: 1px solid var(--gray-300);
|
|
8726
|
+
display: flex;
|
|
8727
|
+
flex-wrap: nowrap;
|
|
8728
|
+
gap: var(--spacing-base);
|
|
8729
|
+
padding: var(--spacing-base) var(--spacing-md) 0;
|
|
8730
|
+
position: relative;
|
|
8731
|
+
z-index: 0;
|
|
8732
|
+
`;
|
|
8717
8733
|
|
|
8718
8734
|
// src/components/SearchAndFilter/FilterButton.tsx
|
|
8719
8735
|
var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
|
|
8720
8736
|
var FilterButton2 = ({
|
|
8721
8737
|
text = "Filters",
|
|
8722
|
-
icon = "filter-add",
|
|
8738
|
+
icon = import_design_system54.customIcons["filter-add"],
|
|
8723
8739
|
filterCount,
|
|
8724
8740
|
hasSelectedValue,
|
|
8725
8741
|
dataTestId,
|
|
8742
|
+
showDropdownIcon,
|
|
8726
8743
|
...props
|
|
8727
8744
|
}) => {
|
|
8728
8745
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
@@ -8739,7 +8756,8 @@ var FilterButton2 = ({
|
|
|
8739
8756
|
children: [
|
|
8740
8757
|
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
|
|
8741
8758
|
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: FilterButtonText, children: text }),
|
|
8742
|
-
filterCount ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Counter, { count: filterCount, bgColor: "var(--white)" }) : null
|
|
8759
|
+
filterCount ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Counter, { count: filterCount, bgColor: "var(--white)" }) : null,
|
|
8760
|
+
showDropdownIcon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Icon, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
|
|
8743
8761
|
]
|
|
8744
8762
|
}
|
|
8745
8763
|
);
|
|
@@ -9038,6 +9056,7 @@ var FilterControls = ({
|
|
|
9038
9056
|
};
|
|
9039
9057
|
|
|
9040
9058
|
// src/components/SearchAndFilter/FilterItem.tsx
|
|
9059
|
+
var import_CgTrash2 = require("@react-icons/all-files/cg/CgTrash");
|
|
9041
9060
|
var import_design_system57 = require("@uniformdev/design-system");
|
|
9042
9061
|
var import_react89 = require("react");
|
|
9043
9062
|
|
|
@@ -9183,7 +9202,7 @@ var FilterItem = ({
|
|
|
9183
9202
|
css: IconBtn,
|
|
9184
9203
|
"data-testid": "delete-filter",
|
|
9185
9204
|
disabled: filters.length === 1,
|
|
9186
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_design_system57.Icon, { icon:
|
|
9205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_design_system57.Icon, { icon: import_CgTrash2.CgTrash, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
|
|
9187
9206
|
}
|
|
9188
9207
|
)
|
|
9189
9208
|
] })
|
|
@@ -9191,6 +9210,7 @@ var FilterItem = ({
|
|
|
9191
9210
|
};
|
|
9192
9211
|
|
|
9193
9212
|
// src/components/SearchAndFilter/FilterItems.tsx
|
|
9213
|
+
var import_CgMathPlus = require("@react-icons/all-files/cg/CgMathPlus");
|
|
9194
9214
|
var import_design_system59 = require("@uniformdev/design-system");
|
|
9195
9215
|
|
|
9196
9216
|
// src/components/SearchAndFilter/FilterMenu.tsx
|
|
@@ -9214,7 +9234,7 @@ var SearchAndFilterOptionsContainer2 = ({
|
|
|
9214
9234
|
children: buttonRow
|
|
9215
9235
|
}
|
|
9216
9236
|
) : null,
|
|
9217
|
-
additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: additionalFiltersContainer }) : null
|
|
9237
|
+
additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
|
|
9218
9238
|
] });
|
|
9219
9239
|
};
|
|
9220
9240
|
var FilterMenu = ({
|
|
@@ -9403,7 +9423,7 @@ var FilterItems = ({
|
|
|
9403
9423
|
onClick: handleAddFilter,
|
|
9404
9424
|
"data-testid": "add-filter",
|
|
9405
9425
|
children: [
|
|
9406
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_design_system59.Icon, { icon:
|
|
9426
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_design_system59.Icon, { icon: import_CgMathPlus.CgMathPlus, iconColor: "currentColor", size: "1rem" }),
|
|
9407
9427
|
addButtonText
|
|
9408
9428
|
]
|
|
9409
9429
|
}
|
|
@@ -9798,13 +9818,9 @@ var SearchAndFilterButtonGroup2 = import_react92.css`
|
|
|
9798
9818
|
`;
|
|
9799
9819
|
var SortFilterWrapper = (hiddenLocaleInput) => import_react92.css`
|
|
9800
9820
|
align-items: center;
|
|
9801
|
-
border-top: 1px solid var(--gray-300);
|
|
9802
9821
|
display: flex;
|
|
9803
|
-
flex-wrap: wrap;
|
|
9804
9822
|
gap: var(--spacing-base);
|
|
9805
|
-
|
|
9806
|
-
position: relative;
|
|
9807
|
-
z-index: 0;
|
|
9823
|
+
flex-grow: 1;
|
|
9808
9824
|
|
|
9809
9825
|
${(0, import_design_system63.cq)("420px")} {
|
|
9810
9826
|
display: grid;
|
package/dist/index.mjs
CHANGED
|
@@ -2813,7 +2813,9 @@ function serializeVariablesEditorState(editorState) {
|
|
|
2813
2813
|
}
|
|
2814
2814
|
function serializeVariablesEditorSerializedState(serializedEditorState) {
|
|
2815
2815
|
const buf = [];
|
|
2816
|
-
|
|
2816
|
+
if (serializedEditorState) {
|
|
2817
|
+
serializeRecursive(serializedEditorState, buf);
|
|
2818
|
+
}
|
|
2817
2819
|
const result = buf.join("");
|
|
2818
2820
|
return result.length > 0 ? result : void 0;
|
|
2819
2821
|
}
|
|
@@ -2829,6 +2831,9 @@ function serializeRecursive(node, buffer) {
|
|
|
2829
2831
|
}
|
|
2830
2832
|
if ("children" in node && node.children) {
|
|
2831
2833
|
for (const child of node.children) {
|
|
2834
|
+
if (!child) {
|
|
2835
|
+
continue;
|
|
2836
|
+
}
|
|
2832
2837
|
serializeRecursive(child, buffer);
|
|
2833
2838
|
}
|
|
2834
2839
|
}
|
|
@@ -5266,6 +5271,7 @@ function hasReferencedVariables2(value) {
|
|
|
5266
5271
|
|
|
5267
5272
|
// src/components/Variables/VariablesList.tsx
|
|
5268
5273
|
import { css as css27 } from "@emotion/react";
|
|
5274
|
+
import { CgTrash } from "@react-icons/all-files/cg/CgTrash";
|
|
5269
5275
|
import {
|
|
5270
5276
|
AddListButton,
|
|
5271
5277
|
button,
|
|
@@ -5400,7 +5406,7 @@ function VariablesList() {
|
|
|
5400
5406
|
],
|
|
5401
5407
|
"aria-controls": text,
|
|
5402
5408
|
onClick: () => dispatch({ type: "remove", variable: name }),
|
|
5403
|
-
children: /* @__PURE__ */ jsx44(Icon5, { icon:
|
|
5409
|
+
children: /* @__PURE__ */ jsx44(Icon5, { icon: CgTrash, iconColor: "red" })
|
|
5404
5410
|
}
|
|
5405
5411
|
) })
|
|
5406
5412
|
]
|
|
@@ -6323,7 +6329,7 @@ var DataRefreshButton = ({
|
|
|
6323
6329
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
6324
6330
|
import { css as css33 } from "@emotion/react";
|
|
6325
6331
|
import { bindVariables } from "@uniformdev/canvas";
|
|
6326
|
-
import { Callout as Callout5, Container,
|
|
6332
|
+
import { Callout as Callout5, Container, ScrollableList, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
|
|
6327
6333
|
|
|
6328
6334
|
// src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
|
|
6329
6335
|
import { bindVariablesToObject as bindVariablesToObject2 } from "@uniformdev/canvas";
|
|
@@ -6642,7 +6648,7 @@ var ObjectSearchContainer = ({
|
|
|
6642
6648
|
}
|
|
6643
6649
|
]);
|
|
6644
6650
|
};
|
|
6645
|
-
return /* @__PURE__ */
|
|
6651
|
+
return /* @__PURE__ */ jsxs35(VerticalRhythm3, { children: [
|
|
6646
6652
|
/* @__PURE__ */ jsx61(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx61(
|
|
6647
6653
|
InputVariables,
|
|
6648
6654
|
{
|
|
@@ -6659,7 +6665,7 @@ var ObjectSearchContainer = ({
|
|
|
6659
6665
|
}
|
|
6660
6666
|
) : body }),
|
|
6661
6667
|
children
|
|
6662
|
-
] })
|
|
6668
|
+
] });
|
|
6663
6669
|
};
|
|
6664
6670
|
var DefaultResultList = () => {
|
|
6665
6671
|
var _a;
|
|
@@ -8323,7 +8329,7 @@ var TextMultiChoiceEditor = ({
|
|
|
8323
8329
|
};
|
|
8324
8330
|
|
|
8325
8331
|
// src/components/SearchAndFilter/FilterButton.tsx
|
|
8326
|
-
import { Counter as Counter2, Icon as Icon6 } from "@uniformdev/design-system";
|
|
8332
|
+
import { Counter as Counter2, customIcons, Icon as Icon6 } from "@uniformdev/design-system";
|
|
8327
8333
|
|
|
8328
8334
|
// src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
|
|
8329
8335
|
import { css as css38 } from "@emotion/react";
|
|
@@ -8574,15 +8580,26 @@ var SearchAndFilterButtonGroup = css38`
|
|
|
8574
8580
|
margin-top: var(--spacing-xs);
|
|
8575
8581
|
margin-left: calc(56px + var(--spacing-md));
|
|
8576
8582
|
`;
|
|
8583
|
+
var SearchAndFilterAdditionalContainer = css38`
|
|
8584
|
+
align-items: center;
|
|
8585
|
+
border-top: 1px solid var(--gray-300);
|
|
8586
|
+
display: flex;
|
|
8587
|
+
flex-wrap: nowrap;
|
|
8588
|
+
gap: var(--spacing-base);
|
|
8589
|
+
padding: var(--spacing-base) var(--spacing-md) 0;
|
|
8590
|
+
position: relative;
|
|
8591
|
+
z-index: 0;
|
|
8592
|
+
`;
|
|
8577
8593
|
|
|
8578
8594
|
// src/components/SearchAndFilter/FilterButton.tsx
|
|
8579
8595
|
import { jsx as jsx81, jsxs as jsxs44 } from "@emotion/react/jsx-runtime";
|
|
8580
8596
|
var FilterButton2 = ({
|
|
8581
8597
|
text = "Filters",
|
|
8582
|
-
icon = "filter-add",
|
|
8598
|
+
icon = customIcons["filter-add"],
|
|
8583
8599
|
filterCount,
|
|
8584
8600
|
hasSelectedValue,
|
|
8585
8601
|
dataTestId,
|
|
8602
|
+
showDropdownIcon,
|
|
8586
8603
|
...props
|
|
8587
8604
|
}) => {
|
|
8588
8605
|
return /* @__PURE__ */ jsxs44(
|
|
@@ -8599,7 +8616,8 @@ var FilterButton2 = ({
|
|
|
8599
8616
|
children: [
|
|
8600
8617
|
/* @__PURE__ */ jsx81(Icon6, { icon, iconColor: "currentColor", size: "1rem" }),
|
|
8601
8618
|
/* @__PURE__ */ jsx81("span", { css: FilterButtonText, children: text }),
|
|
8602
|
-
filterCount ? /* @__PURE__ */ jsx81(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null
|
|
8619
|
+
filterCount ? /* @__PURE__ */ jsx81(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null,
|
|
8620
|
+
showDropdownIcon ? /* @__PURE__ */ jsx81(Icon6, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
|
|
8603
8621
|
]
|
|
8604
8622
|
}
|
|
8605
8623
|
);
|
|
@@ -8906,6 +8924,7 @@ var FilterControls = ({
|
|
|
8906
8924
|
};
|
|
8907
8925
|
|
|
8908
8926
|
// src/components/SearchAndFilter/FilterItem.tsx
|
|
8927
|
+
import { CgTrash as CgTrash2 } from "@react-icons/all-files/cg/CgTrash";
|
|
8909
8928
|
import { Icon as Icon8, InputComboBox as InputComboBox5 } from "@uniformdev/design-system";
|
|
8910
8929
|
import { useMemo as useMemo23 } from "react";
|
|
8911
8930
|
|
|
@@ -9051,7 +9070,7 @@ var FilterItem = ({
|
|
|
9051
9070
|
css: IconBtn,
|
|
9052
9071
|
"data-testid": "delete-filter",
|
|
9053
9072
|
disabled: filters.length === 1,
|
|
9054
|
-
children: /* @__PURE__ */ jsx85(Icon8, { icon:
|
|
9073
|
+
children: /* @__PURE__ */ jsx85(Icon8, { icon: CgTrash2, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
|
|
9055
9074
|
}
|
|
9056
9075
|
)
|
|
9057
9076
|
] })
|
|
@@ -9059,6 +9078,7 @@ var FilterItem = ({
|
|
|
9059
9078
|
};
|
|
9060
9079
|
|
|
9061
9080
|
// src/components/SearchAndFilter/FilterItems.tsx
|
|
9081
|
+
import { CgMathPlus } from "@react-icons/all-files/cg/CgMathPlus";
|
|
9062
9082
|
import { Icon as Icon9 } from "@uniformdev/design-system";
|
|
9063
9083
|
|
|
9064
9084
|
// src/components/SearchAndFilter/FilterMenu.tsx
|
|
@@ -9082,7 +9102,7 @@ var SearchAndFilterOptionsContainer2 = ({
|
|
|
9082
9102
|
children: buttonRow
|
|
9083
9103
|
}
|
|
9084
9104
|
) : null,
|
|
9085
|
-
additionalFiltersContainer ? /* @__PURE__ */ jsx86("div", { children: additionalFiltersContainer }) : null
|
|
9105
|
+
additionalFiltersContainer ? /* @__PURE__ */ jsx86("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
|
|
9086
9106
|
] });
|
|
9087
9107
|
};
|
|
9088
9108
|
var FilterMenu = ({
|
|
@@ -9271,7 +9291,7 @@ var FilterItems = ({
|
|
|
9271
9291
|
onClick: handleAddFilter,
|
|
9272
9292
|
"data-testid": "add-filter",
|
|
9273
9293
|
children: [
|
|
9274
|
-
/* @__PURE__ */ jsx87(Icon9, { icon:
|
|
9294
|
+
/* @__PURE__ */ jsx87(Icon9, { icon: CgMathPlus, iconColor: "currentColor", size: "1rem" }),
|
|
9275
9295
|
addButtonText
|
|
9276
9296
|
]
|
|
9277
9297
|
}
|
|
@@ -9666,13 +9686,9 @@ var SearchAndFilterButtonGroup2 = css39`
|
|
|
9666
9686
|
`;
|
|
9667
9687
|
var SortFilterWrapper = (hiddenLocaleInput) => css39`
|
|
9668
9688
|
align-items: center;
|
|
9669
|
-
border-top: 1px solid var(--gray-300);
|
|
9670
9689
|
display: flex;
|
|
9671
|
-
flex-wrap: wrap;
|
|
9672
9690
|
gap: var(--spacing-base);
|
|
9673
|
-
|
|
9674
|
-
position: relative;
|
|
9675
|
-
z-index: 0;
|
|
9691
|
+
flex-grow: 1;
|
|
9676
9692
|
|
|
9677
9693
|
${cq2("420px")} {
|
|
9678
9694
|
display: grid;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "19.186.
|
|
3
|
+
"version": "19.186.4-alpha.29+03de47b2a8",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK for React",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"@lexical/selection": "0.17.1",
|
|
51
51
|
"@lexical/utils": "0.17.1",
|
|
52
52
|
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.2.1/react-icons-all-files-5.2.1.tgz",
|
|
53
|
-
"@uniformdev/canvas": "19.186.
|
|
54
|
-
"@uniformdev/design-system": "19.186.
|
|
55
|
-
"@uniformdev/mesh-sdk": "19.186.
|
|
56
|
-
"@uniformdev/richtext": "19.186.
|
|
53
|
+
"@uniformdev/canvas": "19.186.4-alpha.29+03de47b2a8",
|
|
54
|
+
"@uniformdev/design-system": "19.186.4-alpha.29+03de47b2a8",
|
|
55
|
+
"@uniformdev/mesh-sdk": "19.186.4-alpha.29+03de47b2a8",
|
|
56
|
+
"@uniformdev/richtext": "19.186.4-alpha.29+03de47b2a8",
|
|
57
57
|
"dequal": "^2.0.3",
|
|
58
58
|
"lexical": "0.17.1",
|
|
59
59
|
"mitt": "3.0.1",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "03de47b2a82e853fe3a989a5a60f352c74ed2777"
|
|
91
91
|
}
|