@dropins/storefront-requisition-list 0.0.1 → 0.1.0-alpha
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/api/addProductsToRequisitionList/addProductsToRequisitionList.d.ts +5 -0
- package/api/addProductsToRequisitionList/graphql/addProductsToRequisitionList.d.ts +18 -0
- package/api/addProductsToRequisitionList/index.d.ts +18 -0
- package/api/addRequisitionListItemsToCart/addRequisitionListItemsToCart.d.ts +18 -0
- package/api/addRequisitionListItemsToCart/graphql/addRequisitionListItemsToCart.d.ts +18 -0
- package/api/addRequisitionListItemsToCart/index.d.ts +18 -0
- package/api/createRequisitionList/createRequisitionList.d.ts +4 -0
- package/api/createRequisitionList/graphql/createRequisitionList.d.ts +18 -0
- package/api/createRequisitionList/index.d.ts +18 -0
- package/api/deleteRequisitionList/deleteRequisitionList.d.ts +4 -0
- package/api/deleteRequisitionList/graphql/deleteRequisitionList.d.ts +2 -0
- package/api/deleteRequisitionList/index.d.ts +18 -0
- package/api/deleteRequisitionListItems/deleteRequisitionListItems.d.ts +4 -0
- package/api/deleteRequisitionListItems/graphql/deleteRequisitionListItems.d.ts +2 -0
- package/api/deleteRequisitionListItems/index.d.ts +18 -0
- package/api/fetch-graphql/fetch-graphql.d.ts +16 -0
- package/api/fetch-graphql/index.d.ts +16 -0
- package/api/fragments/RequisitionListFragment.graphql.d.ts +18 -0
- package/api/fragments/RequisitionListItemsFragment.graphql.d.ts +18 -0
- package/api/fragments.d.ts +3 -0
- package/api/getRequisitionList/getRequisitionList.d.ts +4 -0
- package/api/getRequisitionList/graphql/getRequisitionList.d.ts +2 -0
- package/api/getRequisitionList/index.d.ts +18 -0
- package/api/getRequisitionLists/getRequisitionLists.d.ts +4 -0
- package/api/getRequisitionLists/graphql/getRequisitionLists.d.ts +2 -0
- package/api/getRequisitionLists/index.d.ts +18 -0
- package/api/getStoreConfig/graphql/storeConfigQuery.d.ts +18 -0
- package/api/getStoreConfig/index.d.ts +18 -0
- package/api/getStoreConfig/isRequisitionListEnabled.d.ts +18 -0
- package/api/index.d.ts +26 -0
- package/api/initialize/index.d.ts +16 -0
- package/api/updateRequisitionList/graphql/updateRequisitionList.d.ts +2 -0
- package/api/updateRequisitionList/index.d.ts +18 -0
- package/api/updateRequisitionList/updateRequisitionList.d.ts +4 -0
- package/api/updateRequisitionListItems/graphql/updateRequisitionListItems.d.ts +2 -0
- package/api/updateRequisitionListItems/index.d.ts +18 -0
- package/api/updateRequisitionListItems/updateRequisitionListItems.d.ts +5 -0
- package/api.js +7 -1
- package/api.js.map +1 -1
- package/chunks/RequisitionListForm.js +40 -0
- package/chunks/RequisitionListForm.js.map +1 -0
- package/chunks/deleteRequisitionList.js +26 -0
- package/chunks/deleteRequisitionList.js.map +1 -0
- package/chunks/getRequisitionLists.js +24 -0
- package/chunks/getRequisitionLists.js.map +1 -0
- package/chunks/transform-requisition-list.js +12 -0
- package/chunks/transform-requisition-list.js.map +1 -0
- package/components/RequisitionListActions/RequisitionListActions.d.ts +9 -0
- package/components/RequisitionListActions/index.d.ts +19 -0
- package/components/RequisitionListForm/RequisitionListForm.d.ts +14 -0
- package/components/RequisitionListForm/index.d.ts +19 -0
- package/components/RequisitionListGridWrapper/RequisitionListGridWrapper.d.ts +13 -0
- package/components/RequisitionListGridWrapper/index.d.ts +19 -0
- package/components/RequisitionListItem/RequisitionListItem.d.ts +16 -0
- package/components/RequisitionListItem/index.d.ts +19 -0
- package/components/RequisitionListModal/RequisitionListModal.d.ts +14 -0
- package/components/RequisitionListModal/index.d.ts +19 -0
- package/components/index.d.ts +22 -0
- package/containers/RequisitionListForm/RequisitionListForm.d.ts +14 -0
- package/containers/RequisitionListForm/index.d.ts +19 -0
- package/containers/RequisitionListForm.d.ts +3 -0
- package/containers/RequisitionListForm.js +4 -0
- package/containers/RequisitionListForm.js.map +1 -0
- package/containers/RequisitionListGrid/RequisitionListGrid.d.ts +12 -0
- package/containers/RequisitionListGrid/index.d.ts +19 -0
- package/containers/RequisitionListGrid.d.ts +3 -0
- package/containers/RequisitionListGrid.js +4 -0
- package/containers/RequisitionListGrid.js.map +1 -0
- package/containers/RequisitionListNames/RequisitionListNames.d.ts +12 -0
- package/containers/RequisitionListNames/index.d.ts +19 -0
- package/containers/RequisitionListNames.d.ts +3 -0
- package/containers/RequisitionListNames.js +111 -0
- package/containers/RequisitionListNames.js.map +1 -0
- package/containers/index.d.ts +20 -0
- package/data/models/item.d.ts +99 -0
- package/data/models/requisitionList.d.ts +11 -0
- package/data/models/requisitionLists.d.ts +12 -0
- package/data/transforms/__fixtures__/requisitionListGridData.d.ts +5 -0
- package/data/transforms/__fixtures__/requisitionListItemData.d.ts +5 -0
- package/data/transforms/index.d.ts +17 -1
- package/data/transforms/transform-requisition-list.d.ts +92 -0
- package/hooks/useRequisitionListForm.d.ts +12 -0
- package/i18n/en_US.json.d.ts +34 -2
- package/lib/fetch-error.d.ts +21 -0
- package/lib/state.d.ts +22 -0
- package/package.json +1 -1
- package/render.js +3 -1
- package/render.js.map +1 -1
- package/data/models/index.d.ts +0 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RequisitionList } from '../../data/models/requisitionList';
|
|
2
|
+
import { Product } from '../../data/models/item';
|
|
3
|
+
|
|
4
|
+
export declare const addProductsToRequisitionList: (requisitionListUid: string, requisitionListItems: Array<Product>) => Promise<RequisitionList | null>;
|
|
5
|
+
//# sourceMappingURL=addProductsToRequisitionList.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export declare const ADD_PRODUCTS_TO_REQUISITION_LIST_MUTATION: string;
|
|
18
|
+
//# sourceMappingURL=addProductsToRequisitionList.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from '.';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export declare const addRequisitionListItemsToCart: (requisitionListUid: string, requisitionListItemUids: Array<string>) => Promise<Array<string> | null>;
|
|
18
|
+
//# sourceMappingURL=addRequisitionListItemsToCart.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export declare const ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION = "\n mutation ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION(\n $requisitionListUid: ID!, \n $requisitionListItemUids: [ID!]!\n ) {\n addRequisitionListItemsToCart(\n requisitionListUid: $requisitionListUid\n requisitionListItemUids: $requisitionListItemUids\n ) {\n status\n add_requisition_list_items_to_cart_user_errors {\n message\n type\n }\n }\n }\n";
|
|
18
|
+
//# sourceMappingURL=addRequisitionListItemsToCart.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from '.';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export declare const CREATE_REQUISITION_LIST_MUTATION: string;
|
|
18
|
+
//# sourceMappingURL=createRequisitionList.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from '.';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './deleteRequisitionList';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from '.';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export declare const setEndpoint: (endpoint: string) => void, setFetchGraphQlHeader: (key: string, value: string | null) => void, removeFetchGraphQlHeader: (key: string) => void, setFetchGraphQlHeaders: (header: import('@adobe-commerce/fetch-graphql').Header | ((prev: import('@adobe-commerce/fetch-graphql').Header) => import('@adobe-commerce/fetch-graphql').Header)) => void, fetchGraphQl: <T = any>(query: string, options?: import('@adobe-commerce/fetch-graphql').FetchOptions | undefined) => Promise<{
|
|
2
18
|
errors?: import('@adobe-commerce/fetch-graphql').FetchQueryError | undefined;
|
|
3
19
|
data: T;
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export * from './fetch-graphql';
|
|
2
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export declare const REQUISITION_LIST_FRAGMENT = "\nfragment REQUISITION_LIST_FRAGMENT on RequisitionList {\n uid\n name\n description\n items_count\n updated_at\n }\n";
|
|
18
|
+
//# sourceMappingURL=RequisitionListFragment.graphql.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export declare const REQUISITION_LIST_ITEMS_FRAGMENT = "\nfragment REQUISITION_LIST_ITEMS_FRAGMENT on RequistionListItems {\n items {\n uid\n quantity\n customizable_options {\n customizable_option_uid\n is_required\n label\n sort_order\n type\n values {\n customizable_option_value_uid\n label\n value\n price {\n type\n units\n value\n }\n }\n }\n ... on BundleRequisitionListItem {\n bundle_options {\n uid\n label\n type\n values {\n uid\n label\n original_price {\n value\n currency\n }\n priceV2 {\n value\n currency\n }\n quantity\n }\n }\n }\n ... on ConfigurableRequisitionListItem {\n configurable_options {\n configurable_product_option_uid\n configurable_product_option_value_uid\n option_label\n value_label\n }\n }\n ... on DownloadableRequisitionListItem {\n links {\n price\n sample_url\n sort_order\n title\n uid\n }\n samples {\n sample_url\n sort_order\n title\n }\n }\n ... on GiftCardRequisitionListItem {\n gift_card_options {\n amount {\n currency\n value\n }\n custom_giftcard_amount {\n currency\n value\n }\n message\n recipient_email\n recipient_name\n sender_name\n sender_email\n }\n }\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n}\n";
|
|
18
|
+
//# sourceMappingURL=RequisitionListItemsFragment.graphql.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from '.';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './getRequisitionLists';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export declare const STORE_CONFIG_QUERY = "\nquery STORE_CONFIG_QUERY {\n storeConfig {\n is_requisition_list_active\n }\n}\n";
|
|
18
|
+
//# sourceMappingURL=storeConfigQuery.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './isRequisitionListEnabled';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export declare const isRequisitionListEnabled: () => Promise<boolean>;
|
|
18
|
+
//# sourceMappingURL=isRequisitionListEnabled.d.ts.map
|
package/api/index.d.ts
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export * from './initialize';
|
|
2
18
|
export * from './fetch-graphql';
|
|
19
|
+
export * from './getStoreConfig';
|
|
20
|
+
export * from './getRequisitionLists';
|
|
21
|
+
export * from './getRequisitionList';
|
|
22
|
+
export * from './createRequisitionList';
|
|
23
|
+
export * from './updateRequisitionList';
|
|
24
|
+
export * from './deleteRequisitionList';
|
|
25
|
+
export * from './updateRequisitionListItems';
|
|
26
|
+
export * from './deleteRequisitionListItems';
|
|
27
|
+
export * from './addProductsToRequisitionList';
|
|
28
|
+
export * from './addRequisitionListItemsToCart';
|
|
3
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export * from './initialize';
|
|
2
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from '.';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from '.';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RequisitionList } from '../../data/models/requisitionList';
|
|
2
|
+
import { Item } from '../../data/models/item';
|
|
3
|
+
|
|
4
|
+
export declare const updateRequisitionListItems: (requisitionListUid: string, items: Array<Item>) => Promise<RequisitionList | null>;
|
|
5
|
+
//# sourceMappingURL=updateRequisitionListItems.d.ts.map
|
package/api.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{
|
|
3
|
+
import{f as s,h as o}from"./chunks/transform-requisition-list.js";import{g as d,r as m,s as u,a as _,b as E}from"./chunks/transform-requisition-list.js";import{g as G}from"./chunks/getRequisitionLists.js";import{d as q}from"./chunks/deleteRequisitionList.js";import{Initializer as r}from"@dropins/tools/lib.js";import"@dropins/tools/fetch-graphql.js";const i=new r({init:async e=>{const t={};i.config.setConfig({...t,...e})},listeners:()=>[]}),h=i.config,n=`
|
|
4
|
+
query STORE_CONFIG_QUERY {
|
|
5
|
+
storeConfig {
|
|
6
|
+
is_requisition_list_active
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
`,l=async()=>s(n,{method:"GET",cache:"force-cache"}).then(({errors:e,data:t})=>e?o(e):t.storeConfig.is_requisition_list_active==="1");export{h as config,q as deleteRequisitionList,s as fetchGraphQl,d as getConfig,G as getRequisitionLists,i as initialize,l as isRequisitionListEnabled,m as removeFetchGraphQlHeader,u as setEndpoint,_ as setFetchGraphQlHeader,E as setFetchGraphQlHeaders};
|
|
4
10
|
//# sourceMappingURL=api.js.map
|
package/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sources":["/@dropins/storefront-requisition-list/src/api/initialize/initialize.ts","/@dropins/storefront-requisition-list/src/api/
|
|
1
|
+
{"version":3,"file":"api.js","sources":["/@dropins/storefront-requisition-list/src/api/initialize/initialize.ts","/@dropins/storefront-requisition-list/src/api/getStoreConfig/graphql/storeConfigQuery.ts","/@dropins/storefront-requisition-list/src/api/getStoreConfig/isRequisitionListEnabled.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Initializer } from '@adobe-commerce/elsie/lib';\nimport { Lang } from '@adobe-commerce/elsie/i18n';\n// import { events } from '@adobe-commerce/event-bus';\n\ntype ConfigProps = {\n langDefinitions?: Lang;\n};\n\nexport const initialize = new Initializer<ConfigProps>({\n init: async (config) => {\n const defaultConfig = {};\n\n initialize.config.setConfig({ ...defaultConfig, ...config });\n },\n\n listeners: () => [\n // events.on('authenticated', (authenticated) => {\n // console.log('authenticated', authenticated);\n // }),\n ],\n});\n\nexport const config = initialize.config;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const STORE_CONFIG_QUERY = `\nquery STORE_CONFIG_QUERY {\n storeConfig {\n is_requisition_list_active\n }\n}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/requisitionList/api';\n\nimport { STORE_CONFIG_QUERY } from './graphql/storeConfigQuery';\nimport { handleFetchError } from '../../lib/fetch-error';\n\nexport const isRequisitionListEnabled = async (): Promise<boolean> => {\n return fetchGraphQl(STORE_CONFIG_QUERY, {\n method: 'GET',\n cache: 'force-cache',\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n return data.storeConfig.is_requisition_list_active === '1';\n });\n};\n"],"names":["initialize","Initializer","config","defaultConfig","STORE_CONFIG_QUERY","isRequisitionListEnabled","fetchGraphQl","errors","data","handleFetchError"],"mappings":"+VAyBO,MAAMA,EAAa,IAAIC,EAAyB,CACrD,KAAM,MAAOC,GAAW,CACtB,MAAMC,EAAgB,CAAA,EAEtBH,EAAW,OAAO,UAAU,CAAE,GAAGG,EAAe,GAAGD,EAAQ,CAC7D,EAEA,UAAW,IAAM,CAAA,CAKnB,CAAC,EAEYA,EAASF,EAAW,OCtBpBI,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECKrBC,EAA2B,SAC/BC,EAAaF,EAAoB,CACtC,OAAQ,MACR,MAAO,aAAA,CACR,EAAE,KAAK,CAAC,CAAE,OAAAG,EAAQ,KAAAC,KACbD,EAAeE,EAAiBF,CAAM,EAEnCC,EAAK,YAAY,6BAA+B,GACxD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsxs as R,jsx as a}from"@dropins/tools/preact-jsx-runtime.js";import{useState as L}from"@dropins/tools/preact-hooks.js";import{InLineAlert as O,Field as f,Input as C,TextArea as M,Button as h}from"@dropins/tools/components.js";import{classes as _}from"@dropins/tools/lib.js";import{useText as Q}from"@dropins/tools/i18n.js";import{R as b,f as S,h as N,t as g}from"./transform-requisition-list.js";const x=({className:n,mode:s,defaultValues:e={name:"",description:""},error:i=null,onSubmit:l,onCancel:u,...d})=>{const[t,r]=L(e),[c,F]=L(!1),[m,T]=L(!1),o=Q({actionCancel:"RequisitionList.RequisitionListForm.actionCancel",actionSave:"RequisitionList.RequisitionListForm.actionSave",requiredField:"RequisitionList.RequisitionListForm.requiredField",floatingLabel:"RequisitionList.RequisitionListForm.floatingLabel",placeholder:"RequisitionList.RequisitionListForm.placeholder",label:"RequisitionList.RequisitionListForm.label",editTitle:"RequisitionList.RequisitionListForm.editTitle",createTitle:"RequisitionList.RequisitionListForm.createTitle"}),I=p=>q=>{const A=q.target;r($=>({...$,[p]:A.value}))},U=async p=>{var q;if(p.preventDefault(),!(!t.name||m)){T(!0);try{await l({name:t.name.trim(),description:((q=t.description)==null?void 0:q.trim())||void 0})}finally{T(!1)}}},v=()=>F(!0),y=c&&!t.name.trim()?o.requiredField:"",E=s==="edit"?o.editTitle:o.createTitle;return R("div",{...d,className:_(["requisition-list-form",n]),children:[a("div",{className:"requisition-list-form__title",children:E}),i?a(O,{type:"error",className:"requisition-list-form__notification",variant:"secondary",heading:i,"data-testid":"requisition-list-alert"}):null,R("form",{className:_(["requisition-list-form__form",n]),onSubmit:U,children:[a(f,{error:y,disabled:m,children:a(C,{id:"requisition-list-form-name",name:"name",type:"text",floatingLabel:o.floatingLabel,placeholder:o.placeholder,required:!0,value:t.name,onChange:I("name"),onBlur:v})}),a(f,{disabled:m,children:a(M,{id:"requisition-list-form-description",name:"description",label:o.label,placeholder:o.label,value:t.description,onChange:I("description")})}),R("div",{className:"requisition-list-form__actions",children:[a(h,{type:"button",variant:"secondary",onClick:u,disabled:m,"data-testid":"requisition-list-form-cancel",children:o.actionCancel}),a(h,{type:"submit",disabled:m,"data-testid":"requisition-list-form-save",children:o.actionSave})]})]})]})},D=`
|
|
4
|
+
mutation CREATE_REQUISITION_LIST_MUTATION(
|
|
5
|
+
$requisitionListName: String!,
|
|
6
|
+
$requisitionListDescription: String,
|
|
7
|
+
) {
|
|
8
|
+
createRequisitionList(
|
|
9
|
+
input: {
|
|
10
|
+
name: $requisitionListName
|
|
11
|
+
description: $requisitionListDescription
|
|
12
|
+
}
|
|
13
|
+
) {
|
|
14
|
+
requisition_list {
|
|
15
|
+
...REQUISITION_LIST_FRAGMENT
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
${b}
|
|
20
|
+
`,B=async(n,s)=>S(D,{variables:{requisitionListName:n,requisitionListDescription:s}}).then(({errors:e,data:i})=>e?N(e):g(i.createRequisitionList.requisition_list)),w=`
|
|
21
|
+
mutation UPDATE_REQUISITION_LIST_MUTATION(
|
|
22
|
+
$requisitionListUid: ID!,
|
|
23
|
+
$name: String!,
|
|
24
|
+
$description: String,
|
|
25
|
+
) {
|
|
26
|
+
updateRequisitionList(
|
|
27
|
+
requisitionListUid: $requisitionListUid
|
|
28
|
+
input: {
|
|
29
|
+
name: $name
|
|
30
|
+
description: $description
|
|
31
|
+
}
|
|
32
|
+
) {
|
|
33
|
+
requisition_list {
|
|
34
|
+
...REQUISITION_LIST_FRAGMENT
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
${b}
|
|
39
|
+
`,G=async(n,s,e)=>S(w,{variables:{requisitionListUid:n,name:s,description:e}}).then(({errors:i,data:l})=>i?N(i):g(l.updateRequisitionList.requisition_list));function j(n,s,e,i){const[l,u]=L(null);return{error:l,submit:async t=>{u(null);try{const r=n==="edit"&&s?await G(s,t.name,t.description):await B(t.name,t.description);return r&&(e==null||e(r)),r}catch(r){const c=(r==null?void 0:r.message)||"Unexpected error";return u(c),i==null||i(c),null}}}}const K=({mode:n,requisitionListUid:s,defaultValues:e={name:"",description:""},onSuccess:i,onError:l,onCancel:u})=>{const{error:d,submit:t}=j(n,s,i,l);return a(x,{mode:n,defaultValues:e,error:d,onSubmit:async c=>{await t(c)},onCancel:u})};export{K as R};
|
|
40
|
+
//# sourceMappingURL=RequisitionListForm.js.map
|