@soppiya/app-bridge 1.2.5 → 1.2.7
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/components/articles-picker/ui/ArticlesPicker.js +1 -0
- package/dist/components/blogs-picker/ui/BlogsPicker.js +1 -0
- package/dist/components/collections-pciker/ui/CollectionPicker.js +1 -0
- package/dist/components/country-picker/ui/CountryPicker.js +1 -0
- package/dist/components/customers-picker/ui/CustomersPicker.js +1 -0
- package/dist/components/link-list-picker/ui/LinkListPicker.js +1 -0
- package/dist/components/metaobjects-picker/ui/MetaobjectsPicker.js +1 -0
- package/dist/components/pages-picker/ui/PagesPicker.js +1 -0
- package/dist/components/products-picker/ui/ProductPicker.js +1 -0
- package/dist/components/region-picker/ui/RegionPicker.js +1 -0
- package/dist/components/segments-picker/ui/SegmentsPicker.js +1 -0
- package/dist/components/variants-picker/ui/VariantsPicker.d.ts +2 -1
- package/dist/components/variants-picker/ui/VariantsPicker.js +3 -2
- package/dist/components/variants-picker/ui/VariantsPicker.stories.d.ts +2 -1
- package/package.json +1 -1
|
@@ -76,6 +76,7 @@ const ArticlesPicker = ({ title = "Articles", initialIds = [], limit = 1 / 0, ok
|
|
|
76
76
|
children: [
|
|
77
77
|
/*#__PURE__*/ jsx(Box, {
|
|
78
78
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
79
|
+
variant: "primary",
|
|
79
80
|
disabled: !selectedVariant.includes(article._id) && isReached,
|
|
80
81
|
checked: selectedVariant.includes(String(article._id)),
|
|
81
82
|
onChange: ()=>{}
|
|
@@ -75,6 +75,7 @@ const BlogsPicker = ({ title = "Blogs", initialIds = [], limit = 1 / 0, okButton
|
|
|
75
75
|
children: [
|
|
76
76
|
/*#__PURE__*/ jsx(Box, {
|
|
77
77
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
78
|
+
variant: "primary",
|
|
78
79
|
disabled: !selectedBlog.includes(blog._id) && isReached,
|
|
79
80
|
checked: selectedBlog.includes(String(blog._id)),
|
|
80
81
|
onChange: ()=>{}
|
|
@@ -74,6 +74,7 @@ const CollectionPicker = ({ title = "Collections", initialIds = [], limit = 1 /
|
|
|
74
74
|
children: [
|
|
75
75
|
/*#__PURE__*/ jsx(Box, {
|
|
76
76
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
77
|
+
variant: "primary",
|
|
77
78
|
disabled: !selectedCollection.includes(collection._id) && isReached,
|
|
78
79
|
checked: selectedCollection.includes(String(collection._id)),
|
|
79
80
|
onChange: ()=>{}
|
|
@@ -76,6 +76,7 @@ const CountryPicker = ({ title = "Countries", initialIds = [], limit = 1 / 0, ok
|
|
|
76
76
|
children: [
|
|
77
77
|
/*#__PURE__*/ jsx(Box, {
|
|
78
78
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
79
|
+
variant: "primary",
|
|
79
80
|
disabled: !selectedCustomer.includes(country._id) && isReached,
|
|
80
81
|
checked: selectedCustomer.includes(String(country._id)),
|
|
81
82
|
onChange: ()=>{}
|
|
@@ -76,6 +76,7 @@ const CustomersPicker = ({ title = "Customers", initialIds = [], limit = 1 / 0,
|
|
|
76
76
|
children: [
|
|
77
77
|
/*#__PURE__*/ jsx(Box, {
|
|
78
78
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
79
|
+
variant: "primary",
|
|
79
80
|
disabled: !selectedCustomer.includes(customer._id) && isReached,
|
|
80
81
|
checked: selectedCustomer.includes(String(customer._id)),
|
|
81
82
|
onChange: ()=>{}
|
|
@@ -74,6 +74,7 @@ const LinkListPicker = ({ title = "Linklist", initialIds = [], limit = 1 / 0, ok
|
|
|
74
74
|
gapX: 60,
|
|
75
75
|
children: /*#__PURE__*/ jsx(Box, {
|
|
76
76
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
77
|
+
variant: "primary",
|
|
77
78
|
disabled: !selectedLinklist.includes(linklist._id) && isReached,
|
|
78
79
|
checked: selectedLinklist.includes(String(linklist._id)),
|
|
79
80
|
onChange: ()=>{}
|
|
@@ -74,6 +74,7 @@ const MetaobjectsPicker = ({ title = "Metaobjects", initialIds = [], limit = 1 /
|
|
|
74
74
|
gapX: 60,
|
|
75
75
|
children: /*#__PURE__*/ jsx(Box, {
|
|
76
76
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
77
|
+
variant: "primary",
|
|
77
78
|
disabled: !selectedMetaobject.includes(metaobjects._id) && isReached,
|
|
78
79
|
checked: selectedMetaobject.includes(String(metaobjects._id)),
|
|
79
80
|
onChange: ()=>{}
|
|
@@ -75,6 +75,7 @@ const PagesPicker = ({ title = "Pages", initialIds = [], limit = 1 / 0, okButton
|
|
|
75
75
|
children: [
|
|
76
76
|
/*#__PURE__*/ jsx(Box, {
|
|
77
77
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
78
|
+
variant: "primary",
|
|
78
79
|
disabled: !selectedPage.includes(page._id) && isReached,
|
|
79
80
|
checked: selectedPage.includes(String(page._id)),
|
|
80
81
|
onChange: ()=>{}
|
|
@@ -76,6 +76,7 @@ const ProductsPicker = ({ title = "Products", initialIds = [], limit = 1 / 0, ok
|
|
|
76
76
|
children: [
|
|
77
77
|
/*#__PURE__*/ jsx(Box, {
|
|
78
78
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
79
|
+
variant: "primary",
|
|
79
80
|
disabled: !selectedProduct.includes(product._id) && isReached,
|
|
80
81
|
checked: selectedProduct.includes(String(product._id)),
|
|
81
82
|
onChange: ()=>{}
|
|
@@ -79,6 +79,7 @@ const RegionPicker = ({ title, initialIds, countries, limit = 1 / 0, okButtonLoa
|
|
|
79
79
|
children: [
|
|
80
80
|
/*#__PURE__*/ jsx(Box, {
|
|
81
81
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
82
|
+
variant: "primary",
|
|
82
83
|
disabled: !selectedRegion.includes(region._id) && isReached,
|
|
83
84
|
checked: selectedRegion.includes(String(region._id)),
|
|
84
85
|
onChange: ()=>{}
|
|
@@ -76,6 +76,7 @@ const SegmentPicker = ({ title = "Segments", initialIds = [], limit = 1 / 0, okB
|
|
|
76
76
|
children: [
|
|
77
77
|
/*#__PURE__*/ jsx(Box, {
|
|
78
78
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
79
|
+
variant: "primary",
|
|
79
80
|
disabled: !selectedSegment.includes(segment._id) && isReached,
|
|
80
81
|
checked: selectedSegment.includes(String(segment._id)),
|
|
81
82
|
onChange: ()=>{}
|
|
@@ -3,8 +3,9 @@ type Props = {
|
|
|
3
3
|
initialIds?: string[];
|
|
4
4
|
limit?: number;
|
|
5
5
|
okButtonLoading?: boolean;
|
|
6
|
+
buttonText?: string;
|
|
6
7
|
onClose?: () => void;
|
|
7
8
|
onOk?: (variants: string[]) => void;
|
|
8
9
|
};
|
|
9
|
-
declare const VariantsPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const VariantsPicker: ({ title, initialIds, limit, okButtonLoading, buttonText, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default VariantsPicker;
|
|
@@ -6,7 +6,7 @@ import classnames from "classnames";
|
|
|
6
6
|
import lodash from "lodash";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { useVariants } from "../model/useVariants.js";
|
|
9
|
-
const VariantsPicker = ({ title = "Variants", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
|
|
9
|
+
const VariantsPicker = ({ title = "Variants", initialIds = [], limit = 1 / 0, okButtonLoading, buttonText = "Add", onClose, onOk })=>{
|
|
10
10
|
const [selectedVariant, setSelectedVariant] = useState(initialIds);
|
|
11
11
|
const { query, debounceQuery, onChangeQuery } = useFilterQuery();
|
|
12
12
|
const { variants, pageInfo, isLoadingVariants, fetchMoreVariants } = useVariants({
|
|
@@ -33,7 +33,7 @@ const VariantsPicker = ({ title = "Variants", initialIds = [], limit = 1 / 0, ok
|
|
|
33
33
|
loading: okButtonLoading,
|
|
34
34
|
disabled: lodash.isEmpty(selectedVariant) || isDisabled,
|
|
35
35
|
onClick: handleOk,
|
|
36
|
-
children:
|
|
36
|
+
children: buttonText
|
|
37
37
|
})
|
|
38
38
|
});
|
|
39
39
|
return /*#__PURE__*/ jsx(Modal, {
|
|
@@ -76,6 +76,7 @@ const VariantsPicker = ({ title = "Variants", initialIds = [], limit = 1 / 0, ok
|
|
|
76
76
|
children: [
|
|
77
77
|
/*#__PURE__*/ jsx(Box, {
|
|
78
78
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
79
|
+
variant: "primary",
|
|
79
80
|
disabled: !selectedVariant.includes(variant._id) && isReached,
|
|
80
81
|
checked: selectedVariant.includes(String(variant._id)),
|
|
81
82
|
onChange: ()=>{}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
declare const meta: {
|
|
2
2
|
title: string;
|
|
3
|
-
component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
|
|
3
|
+
component: ({ title, initialIds, limit, okButtonLoading, buttonText, onClose, onOk }: {
|
|
4
4
|
title?: string;
|
|
5
5
|
initialIds?: string[];
|
|
6
6
|
limit?: number;
|
|
7
7
|
okButtonLoading?: boolean;
|
|
8
|
+
buttonText?: string;
|
|
8
9
|
onClose?: () => void;
|
|
9
10
|
onOk?: (variants: string[]) => void;
|
|
10
11
|
}) => import("react/jsx-runtime").JSX.Element;
|