@uniformdev/mesh-sdk-react 19.30.1-alpha.0 → 19.32.1-alpha.4
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.ts +3 -1
- package/dist/index.esm.js +39 -16
- package/dist/index.js +39 -16
- package/dist/index.mjs +39 -16
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -865,11 +865,13 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
865
865
|
* @default false
|
|
866
866
|
*/
|
|
867
867
|
isMulti?: boolean;
|
|
868
|
+
/** sets disabled state to the interactive element */
|
|
869
|
+
disabled?: boolean;
|
|
868
870
|
};
|
|
869
871
|
/**
|
|
870
872
|
* @description entry search list item is an opinionated UI component best used for initial retrieved results
|
|
871
873
|
* @example <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem> */
|
|
872
|
-
declare const ObjectSearchListItem: ({ id, title, contentType, image, popoverData, onSelect, isMulti, children, }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
874
|
+
declare const ObjectSearchListItem: ({ id, title, contentType, image, popoverData, onSelect, isMulti, disabled, children, }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
873
875
|
/**
|
|
874
876
|
* An opinionated loading skeleton component best used with ObjectSearchListItem
|
|
875
877
|
* @example <ObjectSearchListItemLoadingSkeleton />
|
package/dist/index.esm.js
CHANGED
|
@@ -3786,6 +3786,7 @@ var SelectVariableMenu = ({
|
|
|
3786
3786
|
ref: btnRef,
|
|
3787
3787
|
css: [menuBtn2, buttonCss],
|
|
3788
3788
|
type: "button",
|
|
3789
|
+
"data-test-id": "insert-variable",
|
|
3789
3790
|
children: /* @__PURE__ */ jsx32(CgUsbC, { size: "1.4rem" })
|
|
3790
3791
|
}
|
|
3791
3792
|
),
|
|
@@ -4427,13 +4428,14 @@ function DataResourceVariablesListExplicit({
|
|
|
4427
4428
|
}
|
|
4428
4429
|
function TextVariableRenderer({ definition, value, setValue }) {
|
|
4429
4430
|
var _a;
|
|
4430
|
-
return /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsx39(
|
|
4431
|
+
return /* @__PURE__ */ jsx39("div", { "data-test-id": "variable-input-container", children: /* @__PURE__ */ jsx39(
|
|
4431
4432
|
InputVariables,
|
|
4432
4433
|
{
|
|
4433
4434
|
label: definition.displayName || definition.name,
|
|
4434
4435
|
value: value != null ? value : "",
|
|
4435
4436
|
caption: (_a = definition.helpText) != null ? _a : definition.default !== "" ? `Default value: ${definition.default}` : void 0,
|
|
4436
|
-
onChange: setValue
|
|
4437
|
+
onChange: setValue,
|
|
4438
|
+
"data-test-id": "variable-input"
|
|
4437
4439
|
}
|
|
4438
4440
|
) });
|
|
4439
4441
|
}
|
|
@@ -6633,6 +6635,10 @@ var ObjectListItemContainer = css31`
|
|
|
6633
6635
|
grid-template-columns: 1fr auto;
|
|
6634
6636
|
padding: var(--spacing-sm);
|
|
6635
6637
|
`;
|
|
6638
|
+
var ObjectListItemContainerDisabled = css31`
|
|
6639
|
+
opacity: var(--opacity-50);
|
|
6640
|
+
pointer-events: none;
|
|
6641
|
+
`;
|
|
6636
6642
|
var ObjectListItemLoading = css31`
|
|
6637
6643
|
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
6638
6644
|
border-color: transparent;
|
|
@@ -6697,6 +6703,7 @@ var ObjectSearchListItem = ({
|
|
|
6697
6703
|
popoverData,
|
|
6698
6704
|
onSelect,
|
|
6699
6705
|
isMulti = false,
|
|
6706
|
+
disabled,
|
|
6700
6707
|
children
|
|
6701
6708
|
}) => {
|
|
6702
6709
|
const { onSelectItem, selectedListItems } = useObjectSearchContext();
|
|
@@ -6711,20 +6718,36 @@ var ObjectSearchListItem = ({
|
|
|
6711
6718
|
return onSelectItem([selectedItem]);
|
|
6712
6719
|
};
|
|
6713
6720
|
const selected = selectedListItems.some((item) => item.id === id);
|
|
6714
|
-
return /* @__PURE__ */ jsxs33(
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6721
|
+
return /* @__PURE__ */ jsxs33(
|
|
6722
|
+
"div",
|
|
6723
|
+
{
|
|
6724
|
+
role: "listitem",
|
|
6725
|
+
css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
|
|
6726
|
+
children: [
|
|
6727
|
+
/* @__PURE__ */ jsxs33(
|
|
6728
|
+
"div",
|
|
6729
|
+
{
|
|
6730
|
+
role: "button",
|
|
6731
|
+
onClick: handleSelectItem,
|
|
6732
|
+
css: ObjectListItemControlledContent,
|
|
6733
|
+
"aria-disabled": disabled,
|
|
6734
|
+
children: [
|
|
6735
|
+
!image ? null : /* @__PURE__ */ jsx56("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6736
|
+
/* @__PURE__ */ jsxs33("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6737
|
+
!contentType ? null : /* @__PURE__ */ jsx56("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6738
|
+
/* @__PURE__ */ jsx56("span", { css: ObjectListItemTitle, children: title })
|
|
6739
|
+
] })
|
|
6740
|
+
]
|
|
6741
|
+
}
|
|
6742
|
+
),
|
|
6743
|
+
/* @__PURE__ */ jsxs33("div", { css: ObjectListItemInfoContainer, children: [
|
|
6744
|
+
selected ? /* @__PURE__ */ jsx56(Chip2, { text: "selected", size: "xs" }) : null,
|
|
6745
|
+
!popoverData ? null : /* @__PURE__ */ jsx56(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6746
|
+
] }),
|
|
6747
|
+
!children ? null : /* @__PURE__ */ jsx56("div", { css: ObjectListItemUnControlledContent, children })
|
|
6748
|
+
]
|
|
6749
|
+
}
|
|
6750
|
+
);
|
|
6728
6751
|
};
|
|
6729
6752
|
var ObjectSearchListItemLoadingSkeleton = () => {
|
|
6730
6753
|
return /* @__PURE__ */ jsx56("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
|
package/dist/index.js
CHANGED
|
@@ -3939,6 +3939,7 @@ var SelectVariableMenu = ({
|
|
|
3939
3939
|
ref: btnRef,
|
|
3940
3940
|
css: [menuBtn2, buttonCss],
|
|
3941
3941
|
type: "button",
|
|
3942
|
+
"data-test-id": "insert-variable",
|
|
3942
3943
|
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_cg5.CgUsbC, { size: "1.4rem" })
|
|
3943
3944
|
}
|
|
3944
3945
|
),
|
|
@@ -4567,13 +4568,14 @@ function DataResourceVariablesListExplicit({
|
|
|
4567
4568
|
}
|
|
4568
4569
|
function TextVariableRenderer({ definition, value, setValue }) {
|
|
4569
4570
|
var _a;
|
|
4570
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { "data-test-id": "variable-input-container", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4571
4572
|
InputVariables,
|
|
4572
4573
|
{
|
|
4573
4574
|
label: definition.displayName || definition.name,
|
|
4574
4575
|
value: value != null ? value : "",
|
|
4575
4576
|
caption: (_a = definition.helpText) != null ? _a : definition.default !== "" ? `Default value: ${definition.default}` : void 0,
|
|
4576
|
-
onChange: setValue
|
|
4577
|
+
onChange: setValue,
|
|
4578
|
+
"data-test-id": "variable-input"
|
|
4577
4579
|
}
|
|
4578
4580
|
) });
|
|
4579
4581
|
}
|
|
@@ -6748,6 +6750,10 @@ var ObjectListItemContainer = import_react55.css`
|
|
|
6748
6750
|
grid-template-columns: 1fr auto;
|
|
6749
6751
|
padding: var(--spacing-sm);
|
|
6750
6752
|
`;
|
|
6753
|
+
var ObjectListItemContainerDisabled = import_react55.css`
|
|
6754
|
+
opacity: var(--opacity-50);
|
|
6755
|
+
pointer-events: none;
|
|
6756
|
+
`;
|
|
6751
6757
|
var ObjectListItemLoading = import_react55.css`
|
|
6752
6758
|
animation: ${import_design_system29.skeletonLoading} 1s linear infinite alternate;
|
|
6753
6759
|
border-color: transparent;
|
|
@@ -6812,6 +6818,7 @@ var ObjectSearchListItem = ({
|
|
|
6812
6818
|
popoverData,
|
|
6813
6819
|
onSelect,
|
|
6814
6820
|
isMulti = false,
|
|
6821
|
+
disabled,
|
|
6815
6822
|
children
|
|
6816
6823
|
}) => {
|
|
6817
6824
|
const { onSelectItem, selectedListItems } = useObjectSearchContext();
|
|
@@ -6826,20 +6833,36 @@ var ObjectSearchListItem = ({
|
|
|
6826
6833
|
return onSelectItem([selectedItem]);
|
|
6827
6834
|
};
|
|
6828
6835
|
const selected = selectedListItems.some((item) => item.id === id);
|
|
6829
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6837
|
+
"div",
|
|
6838
|
+
{
|
|
6839
|
+
role: "listitem",
|
|
6840
|
+
css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
|
|
6841
|
+
children: [
|
|
6842
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6843
|
+
"div",
|
|
6844
|
+
{
|
|
6845
|
+
role: "button",
|
|
6846
|
+
onClick: handleSelectItem,
|
|
6847
|
+
css: ObjectListItemControlledContent,
|
|
6848
|
+
"aria-disabled": disabled,
|
|
6849
|
+
children: [
|
|
6850
|
+
!image ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6851
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6852
|
+
!contentType ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6853
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectListItemTitle, children: title })
|
|
6854
|
+
] })
|
|
6855
|
+
]
|
|
6856
|
+
}
|
|
6857
|
+
),
|
|
6858
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
|
|
6859
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system30.Chip, { text: "selected", size: "xs" }) : null,
|
|
6860
|
+
!popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system30.Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6861
|
+
] }),
|
|
6862
|
+
!children ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { css: ObjectListItemUnControlledContent, children })
|
|
6863
|
+
]
|
|
6864
|
+
}
|
|
6865
|
+
);
|
|
6843
6866
|
};
|
|
6844
6867
|
var ObjectSearchListItemLoadingSkeleton = () => {
|
|
6845
6868
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
|
package/dist/index.mjs
CHANGED
|
@@ -3786,6 +3786,7 @@ var SelectVariableMenu = ({
|
|
|
3786
3786
|
ref: btnRef,
|
|
3787
3787
|
css: [menuBtn2, buttonCss],
|
|
3788
3788
|
type: "button",
|
|
3789
|
+
"data-test-id": "insert-variable",
|
|
3789
3790
|
children: /* @__PURE__ */ jsx32(CgUsbC, { size: "1.4rem" })
|
|
3790
3791
|
}
|
|
3791
3792
|
),
|
|
@@ -4427,13 +4428,14 @@ function DataResourceVariablesListExplicit({
|
|
|
4427
4428
|
}
|
|
4428
4429
|
function TextVariableRenderer({ definition, value, setValue }) {
|
|
4429
4430
|
var _a;
|
|
4430
|
-
return /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsx39(
|
|
4431
|
+
return /* @__PURE__ */ jsx39("div", { "data-test-id": "variable-input-container", children: /* @__PURE__ */ jsx39(
|
|
4431
4432
|
InputVariables,
|
|
4432
4433
|
{
|
|
4433
4434
|
label: definition.displayName || definition.name,
|
|
4434
4435
|
value: value != null ? value : "",
|
|
4435
4436
|
caption: (_a = definition.helpText) != null ? _a : definition.default !== "" ? `Default value: ${definition.default}` : void 0,
|
|
4436
|
-
onChange: setValue
|
|
4437
|
+
onChange: setValue,
|
|
4438
|
+
"data-test-id": "variable-input"
|
|
4437
4439
|
}
|
|
4438
4440
|
) });
|
|
4439
4441
|
}
|
|
@@ -6633,6 +6635,10 @@ var ObjectListItemContainer = css31`
|
|
|
6633
6635
|
grid-template-columns: 1fr auto;
|
|
6634
6636
|
padding: var(--spacing-sm);
|
|
6635
6637
|
`;
|
|
6638
|
+
var ObjectListItemContainerDisabled = css31`
|
|
6639
|
+
opacity: var(--opacity-50);
|
|
6640
|
+
pointer-events: none;
|
|
6641
|
+
`;
|
|
6636
6642
|
var ObjectListItemLoading = css31`
|
|
6637
6643
|
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
6638
6644
|
border-color: transparent;
|
|
@@ -6697,6 +6703,7 @@ var ObjectSearchListItem = ({
|
|
|
6697
6703
|
popoverData,
|
|
6698
6704
|
onSelect,
|
|
6699
6705
|
isMulti = false,
|
|
6706
|
+
disabled,
|
|
6700
6707
|
children
|
|
6701
6708
|
}) => {
|
|
6702
6709
|
const { onSelectItem, selectedListItems } = useObjectSearchContext();
|
|
@@ -6711,20 +6718,36 @@ var ObjectSearchListItem = ({
|
|
|
6711
6718
|
return onSelectItem([selectedItem]);
|
|
6712
6719
|
};
|
|
6713
6720
|
const selected = selectedListItems.some((item) => item.id === id);
|
|
6714
|
-
return /* @__PURE__ */ jsxs33(
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6721
|
+
return /* @__PURE__ */ jsxs33(
|
|
6722
|
+
"div",
|
|
6723
|
+
{
|
|
6724
|
+
role: "listitem",
|
|
6725
|
+
css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
|
|
6726
|
+
children: [
|
|
6727
|
+
/* @__PURE__ */ jsxs33(
|
|
6728
|
+
"div",
|
|
6729
|
+
{
|
|
6730
|
+
role: "button",
|
|
6731
|
+
onClick: handleSelectItem,
|
|
6732
|
+
css: ObjectListItemControlledContent,
|
|
6733
|
+
"aria-disabled": disabled,
|
|
6734
|
+
children: [
|
|
6735
|
+
!image ? null : /* @__PURE__ */ jsx56("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6736
|
+
/* @__PURE__ */ jsxs33("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6737
|
+
!contentType ? null : /* @__PURE__ */ jsx56("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6738
|
+
/* @__PURE__ */ jsx56("span", { css: ObjectListItemTitle, children: title })
|
|
6739
|
+
] })
|
|
6740
|
+
]
|
|
6741
|
+
}
|
|
6742
|
+
),
|
|
6743
|
+
/* @__PURE__ */ jsxs33("div", { css: ObjectListItemInfoContainer, children: [
|
|
6744
|
+
selected ? /* @__PURE__ */ jsx56(Chip2, { text: "selected", size: "xs" }) : null,
|
|
6745
|
+
!popoverData ? null : /* @__PURE__ */ jsx56(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6746
|
+
] }),
|
|
6747
|
+
!children ? null : /* @__PURE__ */ jsx56("div", { css: ObjectListItemUnControlledContent, children })
|
|
6748
|
+
]
|
|
6749
|
+
}
|
|
6750
|
+
);
|
|
6728
6751
|
};
|
|
6729
6752
|
var ObjectSearchListItemLoadingSkeleton = () => {
|
|
6730
6753
|
return /* @__PURE__ */ jsx56("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.32.1-alpha.4+e139d9ab3",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK for React",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@hookform/resolvers": "^3.0.1",
|
|
47
47
|
"@lexical/react": "^0.11.1",
|
|
48
|
-
"@uniformdev/design-system": "19.
|
|
49
|
-
"@uniformdev/mesh-sdk": "19.
|
|
48
|
+
"@uniformdev/design-system": "19.32.1-alpha.4+e139d9ab3",
|
|
49
|
+
"@uniformdev/mesh-sdk": "19.32.1-alpha.4+e139d9ab3",
|
|
50
50
|
"lexical": "^0.11.1",
|
|
51
51
|
"mitt": "^3.0.0",
|
|
52
52
|
"react-beautiful-dnd": "13.1.1",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "e139d9ab324b00fff68e36751585b829c3bb1fb5"
|
|
84
84
|
}
|