@soppiya/app-bridge 1.1.8 → 1.1.9

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.
Files changed (40) hide show
  1. package/dist/components/articles-picker/ui/ArticlesPicker.d.ts +2 -1
  2. package/dist/components/articles-picker/ui/ArticlesPicker.js +2 -1
  3. package/dist/components/articles-picker/ui/ProductPicker.stories.d.ts +2 -1
  4. package/dist/components/blogs-picker/ui/BlogsPicker.d.ts +2 -1
  5. package/dist/components/blogs-picker/ui/BlogsPicker.js +2 -1
  6. package/dist/components/blogs-picker/ui/BlogsPicker.stories.d.ts +2 -1
  7. package/dist/components/collections-pciker/ui/CollectionPicker.d.ts +2 -1
  8. package/dist/components/collections-pciker/ui/CollectionPicker.js +2 -1
  9. package/dist/components/collections-pciker/ui/CollectionPicker.stories.d.ts +2 -1
  10. package/dist/components/country-picker/ui/CountryPicker.d.ts +2 -1
  11. package/dist/components/country-picker/ui/CountryPicker.js +2 -1
  12. package/dist/components/country-picker/ui/CountryPicker.stories.d.ts +2 -1
  13. package/dist/components/customers-picker/ui/CustomersPicker.d.ts +2 -1
  14. package/dist/components/customers-picker/ui/CustomersPicker.js +2 -1
  15. package/dist/components/customers-picker/ui/CustomersPicker.stories.d.ts +2 -1
  16. package/dist/components/link-list-picker/ui/LinkListPicker.d.ts +2 -1
  17. package/dist/components/link-list-picker/ui/LinkListPicker.js +2 -1
  18. package/dist/components/link-list-picker/ui/LinkListPicker.stories.d.ts +2 -1
  19. package/dist/components/media/Media.d.ts +2 -1
  20. package/dist/components/media/Media.js +2 -1
  21. package/dist/components/media/Media.stories.d.ts +2 -1
  22. package/dist/components/metaobjects-entries-picker/ui/MetaobjectEntriesPicker.d.ts +2 -1
  23. package/dist/components/metaobjects-entries-picker/ui/MetaobjectEntriesPicker.js +2 -1
  24. package/dist/components/metaobjects-entries-picker/ui/MetaobjectEntriesPicker.stories.d.ts +2 -1
  25. package/dist/components/metaobjects-picker/ui/MetaobjectsPicker.d.ts +2 -1
  26. package/dist/components/metaobjects-picker/ui/MetaobjectsPicker.js +2 -1
  27. package/dist/components/metaobjects-picker/ui/MetaobjectsPicker.stories.d.ts +2 -1
  28. package/dist/components/pages-picker/ui/PagesPicker.d.ts +2 -1
  29. package/dist/components/pages-picker/ui/PagesPicker.js +2 -1
  30. package/dist/components/pages-picker/ui/PagesPicker.stories.d.ts +2 -1
  31. package/dist/components/products-picker/ui/ProductPicker.d.ts +2 -1
  32. package/dist/components/products-picker/ui/ProductPicker.js +2 -1
  33. package/dist/components/products-picker/ui/ProductsPicker.stories.d.ts +2 -1
  34. package/dist/components/segments-picker/ui/SegmentsPicker.d.ts +2 -1
  35. package/dist/components/segments-picker/ui/SegmentsPicker.js +2 -1
  36. package/dist/components/segments-picker/ui/SegmentsPicker.stories.d.ts +2 -1
  37. package/dist/components/variants-picker/ui/VariantsPicker.d.ts +2 -1
  38. package/dist/components/variants-picker/ui/VariantsPicker.js +2 -1
  39. package/dist/components/variants-picker/ui/VariantsPicker.stories.d.ts +2 -1
  40. package/package.json +1 -1
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (articles: string[]) => void;
7
8
  };
8
- declare const ArticlesPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const ArticlesPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default ArticlesPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { userArticles } from "../model/useArticles.js";
9
- const ArticlesPicker = ({ title = "Articles", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const ArticlesPicker = ({ title = "Articles", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedVariant, setSelectedVariant] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { articles, pageInfo, isLoadingArticles, fetchMoreArticles } = userArticles({
@@ -30,6 +30,7 @@ const ArticlesPicker = ({ title = "Articles", initialIds = [], limit = 1 / 0, on
30
30
  gap: 50,
31
31
  justifyContent: "end",
32
32
  children: /*#__PURE__*/ jsx(Button, {
33
+ loading: okButtonLoading,
33
34
  disabled: lodash.isEmpty(selectedVariant) || isDisabled,
34
35
  onClick: handleOk,
35
36
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (articles: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (products: string[]) => void;
7
8
  };
8
- declare const BlogsPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const BlogsPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default BlogsPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { useBlogs } from "../model/useBlogs.js";
9
- const BlogsPicker = ({ title = "Blogs", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const BlogsPicker = ({ title = "Blogs", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedBlog, setSelectedBlog] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { blogs, isLoadingBlogs, fetchMoreBlogs, pageInfo } = useBlogs({
@@ -29,6 +29,7 @@ const BlogsPicker = ({ title = "Blogs", initialIds = [], limit = 1 / 0, onClose,
29
29
  const ButtonJSX = /*#__PURE__*/ jsx(InlineStack, {
30
30
  justifyContent: "end",
31
31
  children: /*#__PURE__*/ jsx(Button, {
32
+ loading: okButtonLoading,
32
33
  onClick: handleOk,
33
34
  disabled: lodash.isEmpty(selectedBlog) || isDisabled,
34
35
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (products: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (collections: string[]) => void;
7
8
  };
8
- declare const CollectionPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const CollectionPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default CollectionPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { useCollections } from "../model/useCollections.js";
9
- const CollectionPicker = ({ title = "Collections", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const CollectionPicker = ({ title = "Collections", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedCollection, setSelectedCollection] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { collections, isLoadingCollections, fetchMoreCollections, pageInfo } = useCollections({
@@ -28,6 +28,7 @@ const CollectionPicker = ({ title = "Collections", initialIds = [], limit = 1 /
28
28
  const ButtonJSX = /*#__PURE__*/ jsx(InlineStack, {
29
29
  justifyContent: "end",
30
30
  children: /*#__PURE__*/ jsx(Button, {
31
+ loading: okButtonLoading,
31
32
  disabled: lodash.isEmpty(selectedCollection) || isDisabled,
32
33
  onClick: handleOk,
33
34
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (collections: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (countries: string[]) => void;
7
8
  };
8
- declare const CountryPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const CountryPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default CountryPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { useCountry } from "../model/useContry.js";
9
- const CountryPicker = ({ title = "Countries", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const CountryPicker = ({ title = "Countries", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedCustomer, setSelectedCustomer] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { countries, pageInfo, isLoadingCountry, fetchMoreCountries } = useCountry({
@@ -30,6 +30,7 @@ const CountryPicker = ({ title = "Countries", initialIds = [], limit = 1 / 0, on
30
30
  gap: 50,
31
31
  justifyContent: "end",
32
32
  children: /*#__PURE__*/ jsx(Button, {
33
+ loading: okButtonLoading,
33
34
  disabled: lodash.isEmpty(selectedCustomer) || isDisabled,
34
35
  onClick: handleOk,
35
36
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (countries: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (customers: string[]) => void;
7
8
  };
8
- declare const CustomersPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const CustomersPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default CustomersPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { useCustomers } from "../model/useCustomers.js";
9
- const CustomersPicker = ({ title = "Customers", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const CustomersPicker = ({ title = "Customers", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedCustomer, setSelectedCustomer] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { customers, pageInfo, isLoadingCustomers, fetchMoreCustomers } = useCustomers({
@@ -30,6 +30,7 @@ const CustomersPicker = ({ title = "Customers", initialIds = [], limit = 1 / 0,
30
30
  gap: 50,
31
31
  justifyContent: "end",
32
32
  children: /*#__PURE__*/ jsx(Button, {
33
+ loading: okButtonLoading,
33
34
  disabled: lodash.isEmpty(selectedCustomer) || isDisabled,
34
35
  onClick: handleOk,
35
36
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (customers: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (linklist: string[]) => void;
7
8
  };
8
- declare const LinkListPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const LinkListPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default LinkListPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { useLinklist } from "../model/useLinkList.js";
9
- const LinkListPicker = ({ title = "Linklist", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const LinkListPicker = ({ title = "Linklist", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedLinklist, setSelectedLinklist] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { linklists, isLoadingLinklist, fetchMoreLinklists, pageInfo } = useLinklist({
@@ -29,6 +29,7 @@ const LinkListPicker = ({ title = "Linklist", initialIds = [], limit = 1 / 0, on
29
29
  const ButtonJSX = /*#__PURE__*/ jsx(InlineStack, {
30
30
  justifyContent: "end",
31
31
  children: /*#__PURE__*/ jsx(Button, {
32
+ loading: okButtonLoading,
32
33
  disabled: lodash.isEmpty(selectedLinklist) || isDisabled,
33
34
  onClick: handleOk,
34
35
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (linklist: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -4,8 +4,9 @@ type MediaProps = {
4
4
  types?: MediaType[];
5
5
  limit?: number;
6
6
  isFilterByTypes?: boolean;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (medias: string[]) => void;
9
10
  };
10
- declare const Media: ({ title, types, isFilterByTypes, limit, onClose, onOk, }: MediaProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const Media: ({ title, types, isFilterByTypes, limit, okButtonLoading, onClose, onOk, }: MediaProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export default Media;
@@ -23,7 +23,7 @@ const Media_Media = ({ title = "Media", types = [
23
23
  MediaType.file,
24
24
  MediaType.image,
25
25
  MediaType.video
26
- ], isFilterByTypes = false, limit = 1 / 0, onClose, onOk })=>{
26
+ ], isFilterByTypes = false, limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
27
27
  const { query, debounceQuery, onChangeQuery } = useMediaFilter();
28
28
  const { sorting, onChangeSorting } = useMediaSorting();
29
29
  const [selectedMedias, setSelectedMedias] = useState([]);
@@ -131,6 +131,7 @@ const Media_Media = ({ title = "Media", types = [
131
131
  stack: "full",
132
132
  justifyContent: "end",
133
133
  children: /*#__PURE__*/ jsx(Button, {
134
+ loading: okButtonLoading,
134
135
  size: "xs",
135
136
  disabled: !isValidMedia(),
136
137
  onClick: handleOk,
@@ -1,10 +1,11 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, types, isFilterByTypes, limit, onClose, onOk, }: {
3
+ component: ({ title, types, isFilterByTypes, limit, okButtonLoading, onClose, onOk, }: {
4
4
  title?: string;
5
5
  types?: import("../../shared/graphql/graphql").MediaType[];
6
6
  limit?: number;
7
7
  isFilterByTypes?: boolean;
8
+ okButtonLoading?: boolean;
8
9
  onClose?: () => void;
9
10
  onOk?: (medias: string[]) => void;
10
11
  }) => import("react/jsx-runtime").JSX.Element;
@@ -3,8 +3,9 @@ type Props = {
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
5
  metaobjects?: string[];
6
+ okButtonLoading?: boolean;
6
7
  onClose?: () => void;
7
8
  onOk?: (metaobjectEntries: string[]) => void;
8
9
  };
9
- declare const MetaobjectEntriesPicker: ({ title, initialIds, limit, metaobjects, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ declare const MetaobjectEntriesPicker: ({ title, initialIds, limit, metaobjects, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
10
11
  export default MetaobjectEntriesPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { useMetaobjectEntries } from "../model/useMetaobjectEntries.js";
9
- const MetaobjectEntriesPicker = ({ title = "Metaobject entries", initialIds = [], limit = 1 / 0, metaobjects = [], onClose, onOk })=>{
9
+ const MetaobjectEntriesPicker = ({ title = "Metaobject entries", initialIds = [], limit = 1 / 0, metaobjects = [], okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedMetaobjectEntries, setSelectedMetaobjectEntries] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { metaobjectEntries, isLoadingMetaobjectEntries, fetchMoreMetaobjectEntries, pageInfo } = useMetaobjectEntries({
@@ -32,6 +32,7 @@ const MetaobjectEntriesPicker = ({ title = "Metaobject entries", initialIds = []
32
32
  const ButtonJSX = /*#__PURE__*/ jsx(InlineStack, {
33
33
  justifyContent: "end",
34
34
  children: /*#__PURE__*/ jsx(Button, {
35
+ loading: okButtonLoading,
35
36
  disabled: lodash.isEmpty(selectedMetaobjectEntries) || isDisabled,
36
37
  onClick: handleOk,
37
38
  children: "Add"
@@ -1,10 +1,11 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, metaobjects, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, metaobjects, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
7
  metaobjects?: string[];
8
+ okButtonLoading?: boolean;
8
9
  onClose?: () => void;
9
10
  onOk?: (metaobjectEntries: string[]) => void;
10
11
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (metaobjectEntries: string[]) => void;
7
8
  };
8
- declare const MetaobjectsPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const MetaobjectsPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default MetaobjectsPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { useMetaobjects } from "../model/useMetaobjects.js";
9
- const MetaobjectsPicker = ({ title = "Metaobjects", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const MetaobjectsPicker = ({ title = "Metaobjects", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedMetaobject, setSelectedMetaobject] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { metaobjects, isMetaobjectsLoading, fetchMoreMetaobjects, pageInfo } = useMetaobjects({
@@ -29,6 +29,7 @@ const MetaobjectsPicker = ({ title = "Metaobjects", initialIds = [], limit = 1 /
29
29
  const ButtonJSX = /*#__PURE__*/ jsx(InlineStack, {
30
30
  justifyContent: "end",
31
31
  children: /*#__PURE__*/ jsx(Button, {
32
+ loading: okButtonLoading,
32
33
  disabled: lodash.isEmpty(selectedMetaobject) || isDisabled,
33
34
  onClick: handleOk,
34
35
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (metaobjectEntries: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (pages: string[]) => void;
7
8
  };
8
- declare const PagesPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const PagesPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default PagesPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { usePages } from "../model/usePages.js";
9
- const PagesPicker = ({ title = "Pages", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const PagesPicker = ({ title = "Pages", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedPage, setSelectedPage] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { pages, fetchMorePages, isLoadingPages, pageInfo } = usePages({
@@ -29,6 +29,7 @@ const PagesPicker = ({ title = "Pages", initialIds = [], limit = 1 / 0, onClose,
29
29
  const ButtonJSX = /*#__PURE__*/ jsx(InlineStack, {
30
30
  justifyContent: "end",
31
31
  children: /*#__PURE__*/ jsx(Button, {
32
+ loading: okButtonLoading,
32
33
  disabled: lodash.isEmpty(selectedPage) || isDisabled,
33
34
  onClick: handleOk,
34
35
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (pages: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (products: string[]) => void;
7
8
  };
8
- declare const ProductsPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const ProductsPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default ProductsPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { useProducts } from "../model/useProducts.js";
9
- const ProductsPicker = ({ title = "Products", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const ProductsPicker = ({ title = "Products", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedProduct, setSelectedProduct] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { products, pageInfo, isLoadingProducts, fetchMoreProducts } = useProducts({
@@ -30,6 +30,7 @@ const ProductsPicker = ({ title = "Products", initialIds = [], limit = 1 / 0, on
30
30
  gap: 50,
31
31
  justifyContent: "end",
32
32
  children: /*#__PURE__*/ jsx(Button, {
33
+ loading: okButtonLoading,
33
34
  disabled: lodash.isEmpty(selectedProduct) || isDisabled,
34
35
  onClick: handleOk,
35
36
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (products: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (customers: string[]) => void;
7
8
  };
8
- declare const SegmentPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const SegmentPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default SegmentPicker;
@@ -6,7 +6,7 @@ import classnames from "classnames";
6
6
  import lodash from "lodash";
7
7
  import { useState } from "react";
8
8
  import { useSegments } from "../model/useSegments.js";
9
- const SegmentPicker = ({ title = "Segments", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
9
+ const SegmentPicker = ({ title = "Segments", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedSegment, setSelectedSegment] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { segments, pageInfo, isLoadingSegments, fetchMoreSegments } = useSegments({
@@ -30,6 +30,7 @@ const SegmentPicker = ({ title = "Segments", initialIds = [], limit = 1 / 0, onC
30
30
  gap: 50,
31
31
  justifyContent: "end",
32
32
  children: /*#__PURE__*/ jsx(Button, {
33
+ loading: okButtonLoading,
33
34
  disabled: lodash.isEmpty(selectedSegment) || isDisabled,
34
35
  onClick: handleOk,
35
36
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (customers: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,9 @@ type Props = {
2
2
  title?: string;
3
3
  initialIds?: string[];
4
4
  limit?: number;
5
+ okButtonLoading?: boolean;
5
6
  onClose?: () => void;
6
7
  onOk?: (variants: string[]) => void;
7
8
  };
8
- declare const VariantsPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const VariantsPicker: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  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, onClose, onOk })=>{
9
+ const VariantsPicker = ({ title = "Variants", initialIds = [], limit = 1 / 0, okButtonLoading, onClose, onOk })=>{
10
10
  const [selectedVariant, setSelectedVariant] = useState(initialIds);
11
11
  const { query, debounceQuery, onChangeQuery } = useFilterQuery();
12
12
  const { variants, pageInfo, isLoadingVariants, fetchMoreVariants } = useVariants({
@@ -30,6 +30,7 @@ const VariantsPicker = ({ title = "Variants", initialIds = [], limit = 1 / 0, on
30
30
  gap: 50,
31
31
  justifyContent: "end",
32
32
  children: /*#__PURE__*/ jsx(Button, {
33
+ loading: okButtonLoading,
33
34
  disabled: lodash.isEmpty(selectedVariant) || isDisabled,
34
35
  onClick: handleOk,
35
36
  children: "Add"
@@ -1,9 +1,10 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ title, initialIds, limit, onClose, onOk }: {
3
+ component: ({ title, initialIds, limit, okButtonLoading, onClose, onOk }: {
4
4
  title?: string;
5
5
  initialIds?: string[];
6
6
  limit?: number;
7
+ okButtonLoading?: boolean;
7
8
  onClose?: () => void;
8
9
  onOk?: (variants: string[]) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soppiya/app-bridge",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {