@dropins/storefront-purchase-order 0.0.1-alpha1 → 0.0.1-alpha3
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/addPurchaseOrderComment/addPurchaseOrderComment.d.ts +4 -0
- package/api/addPurchaseOrderComment/graphql/addPurchaseOrderComment.graphql.d.ts +18 -0
- package/api/addPurchaseOrderComment/index.d.ts +18 -0
- package/api/addPurchaseOrderItemsToCart/addPurchaseOrderItemsToCart.d.ts +4 -0
- package/api/addPurchaseOrderItemsToCart/graphql/addPurchaseOrderItemsToCart.graphql.d.ts +18 -0
- package/api/addPurchaseOrderItemsToCart/index.d.ts +18 -0
- package/api/approvePurchaseOrders/approvePurchaseOrders.d.ts +10 -0
- package/api/approvePurchaseOrders/graphql/approvePurchaseOrders.graphql.d.ts +18 -0
- package/api/approvePurchaseOrders/index.d.ts +18 -0
- package/api/cancelPurchaseOrders/cancelPurchaseOrders.d.ts +10 -0
- package/api/cancelPurchaseOrders/graphql/cancelPurchaseOrders.graphql.d.ts +18 -0
- package/api/cancelPurchaseOrders/index.d.ts +18 -0
- package/api/createPurchaseOrderApprovalRule/createPurchaseOrderApprovalRule.d.ts +4 -0
- package/api/createPurchaseOrderApprovalRule/graphql/createPurchaseOrderApprovalRule.graphql.d.ts +18 -0
- package/api/createPurchaseOrderApprovalRule/index.d.ts +18 -0
- package/api/deletePurchaseOrderApprovalRule/deletePurchaseOrderApprovalRule.d.ts +9 -0
- package/api/deletePurchaseOrderApprovalRule/graphql/deletePurchaseOrderApprovalRule.graphql.d.ts +18 -0
- package/api/deletePurchaseOrderApprovalRule/index.d.ts +18 -0
- package/api/fragments.d.ts +18 -0
- package/api/getPurchaseOrder/getPurchaseOrder.d.ts +6 -0
- package/api/getPurchaseOrder/graphql/getPurchaseOrder.graphql.d.ts +18 -0
- package/api/getPurchaseOrder/index.d.ts +18 -0
- package/api/getPurchaseOrderApprovalRuleMetadata/getPurchaseOrderApprovalRuleMetadata.d.ts +4 -0
- package/api/getPurchaseOrderApprovalRuleMetadata/graphql/getPurchaseOrderApprovalRuleMetadata.graphql.d.ts +18 -0
- package/api/getPurchaseOrderApprovalRuleMetadata/index.d.ts +18 -0
- package/api/getPurchaseOrders/getPurchaseOrders.d.ts +12 -0
- package/api/getPurchaseOrders/graphql/getPurchaseOrders.graphql.d.ts +18 -0
- package/api/getPurchaseOrders/index.d.ts +18 -0
- package/api/graphql/PurchaseOrdersFragment.graphql.d.ts +18 -0
- package/api/index.d.ts +30 -0
- package/api/placeOrderForPurchaseOrder/graphql/placeOrderForPurchaseOrder.graphql.d.ts +18 -0
- package/api/placeOrderForPurchaseOrder/index.d.ts +18 -0
- package/api/placeOrderForPurchaseOrder/placeOrderForPurchaseOrder.d.ts +4 -0
- package/api/placePurchaseOrder/graphql/placePurchaseOrder.graphql.d.ts +18 -0
- package/api/placePurchaseOrder/index.d.ts +18 -0
- package/api/placePurchaseOrder/placePurchaseOrder.d.ts +6 -0
- package/api/rejectPurchaseOrders/graphql/rejectPurchaseOrders.graphql.d.ts +18 -0
- package/api/rejectPurchaseOrders/index.d.ts +18 -0
- package/api/rejectPurchaseOrders/rejectPurchaseOrders.d.ts +10 -0
- package/api/updatePurchaseOrderApprovalRule/graphql/updatePurchaseOrderApprovalRule.graphql.d.ts +18 -0
- package/api/updatePurchaseOrderApprovalRule/index.d.ts +18 -0
- package/api/updatePurchaseOrderApprovalRule/updatePurchaseOrderApprovalRule.d.ts +4 -0
- package/api/validatePurchaseOrders/graphql/validatePurchaseOrders.graphql.d.ts +18 -0
- package/api/validatePurchaseOrders/index.d.ts +18 -0
- package/api/validatePurchaseOrders/validatePurchaseOrders.d.ts +10 -0
- package/api.js +285 -1
- package/api.js.map +1 -1
- package/chunks/PurchaseOrdersTableActions.js +4 -0
- package/chunks/PurchaseOrdersTableActions.js.map +1 -0
- package/chunks/getPurchaseOrders.js +113 -0
- package/chunks/getPurchaseOrders.js.map +1 -0
- package/chunks/useCustomerRolePermissions.js +4 -0
- package/chunks/useCustomerRolePermissions.js.map +1 -0
- package/components/PurchaseOrdersHeader/PurchaseOrdersHeader.d.ts +7 -0
- package/components/PurchaseOrdersHeader/index.d.ts +19 -0
- package/components/PurchaseOrdersTable/PurchaseOrdersTable.d.ts +5 -0
- package/components/PurchaseOrdersTable/index.d.ts +19 -0
- package/components/PurchaseOrdersTableActions/PurchaseOrdersTableActions.d.ts +5 -0
- package/components/PurchaseOrdersTableActions/index.d.ts +19 -0
- package/components/index.d.ts +19 -1
- package/configs/companyPurchaseOrders.config.d.ts +4 -0
- package/configs/customerPurchaseOrders.config.d.ts +4 -0
- package/configs/index.d.ts +21 -0
- package/configs/pageSize.config.d.ts +22 -0
- package/configs/purchaseOrderApprovalRules.config.d.ts +4 -0
- package/containers/CompanyPurchaseOrders/CompanyPurchaseOrders.d.ts +5 -0
- package/containers/CompanyPurchaseOrders/index.d.ts +19 -0
- package/containers/CompanyPurchaseOrders.d.ts +3 -0
- package/containers/CompanyPurchaseOrders.js +4 -0
- package/containers/CompanyPurchaseOrders.js.map +1 -0
- package/containers/CustomerPurchaseOrders/CustomerPurchaseOrders.d.ts +5 -0
- package/containers/CustomerPurchaseOrders/index.d.ts +19 -0
- package/containers/CustomerPurchaseOrders.d.ts +3 -0
- package/containers/CustomerPurchaseOrders.js +4 -0
- package/containers/CustomerPurchaseOrders.js.map +1 -0
- package/containers/RequireApprovalPurchaseOrders/RequireApprovalPurchaseOrders.d.ts +5 -0
- package/containers/RequireApprovalPurchaseOrders/index.d.ts +19 -0
- package/containers/RequireApprovalPurchaseOrders.d.ts +3 -0
- package/containers/RequireApprovalPurchaseOrders.js +4 -0
- package/containers/RequireApprovalPurchaseOrders.js.map +1 -0
- package/containers/index.d.ts +3 -1
- package/data/models/cart-model.d.ts +40 -0
- package/data/models/customer-order-model.d.ts +128 -0
- package/data/models/customer-role-permissions-model.d.ts +35 -0
- package/data/models/index.d.ts +23 -1
- package/data/models/purchase-order-approval-rule-metadata-model.d.ts +33 -0
- package/data/models/purchase-order-approval-rule-model.d.ts +50 -0
- package/data/models/purchase-order-comment-model.d.ts +39 -0
- package/data/models/purchase-order-model.d.ts +75 -0
- package/data/transforms/index.d.ts +22 -1
- package/data/transforms/transform-cart.d.ts +4 -0
- package/data/transforms/transform-customer-order.d.ts +4 -0
- package/data/transforms/transform-customer-role-permissions.d.ts +20 -0
- package/data/transforms/transform-purchase-order-approval-rule-metadata.d.ts +4 -0
- package/data/transforms/transform-purchase-order-approval-rule.d.ts +4 -0
- package/data/transforms/transform-purchase-order-comment.d.ts +4 -0
- package/data/transforms/transform-purchase-order.d.ts +4 -0
- package/hooks/index.d.ts +19 -0
- package/hooks/useCustomerRolePermissions.d.ts +18 -0
- package/hooks/usePurchaseOrders.d.ts +4 -0
- package/i18n/en_US.json.d.ts +87 -2
- package/lib/case-converter.d.ts +25 -0
- package/lib/fetch-error.d.ts +21 -0
- package/lib/formatDate.d.ts +24 -0
- package/lib/getRange.d.ts +6 -0
- package/lib/index.d.ts +7 -0
- package/lib/isValidUrl.d.ts +2 -0
- package/lib/network-error.d.ts +22 -0
- package/mocks/index.d.ts +2832 -0
- package/mocks/storybook/index.d.ts +29 -0
- package/package.json +1 -1
- package/render.js +2 -1
- package/render.js.map +1 -1
- package/types/api/api.enums.types.d.ts +21 -0
- package/types/api/index.d.ts +2 -0
- package/types/components/index.d.ts +4 -0
- package/types/components/pagination.types.d.ts +27 -0
- package/types/components/purchaseOrdersTable.types.d.ts +38 -0
- package/types/components/purchaseOrdersTableActions.d.ts +8 -0
- package/types/containers/companyPurchaseOrders.types.d.ts +13 -0
- package/types/containers/customerPurchaseOrders.types.d.ts +13 -0
- package/types/containers/index.d.ts +4 -0
- package/types/containers/requireApprovalPurchaseOrders.types.d.ts +13 -0
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/usePurchaseOrders.types.d.ts +41 -0
package/i18n/en_US.json.d.ts
CHANGED
|
@@ -1,5 +1,90 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"PurchaseOrders": {
|
|
3
|
+
"customerPurchaseOrders": {
|
|
4
|
+
"containerTitle": "My purchase orders",
|
|
5
|
+
"noPurchaseOrders": "No purchase orders found."
|
|
6
|
+
},
|
|
7
|
+
"companyPurchaseOrders": {
|
|
8
|
+
"containerTitle": "Company purchase orders",
|
|
9
|
+
"noPurchaseOrders": "No company purchase orders found."
|
|
10
|
+
},
|
|
11
|
+
"requireApprovalPurchaseOrders": {
|
|
12
|
+
"containerTitle": "Requires my approval",
|
|
13
|
+
"noPurchaseOrders": "No purchase orders requiring my approval found."
|
|
14
|
+
},
|
|
15
|
+
"approvalRulesList": {
|
|
16
|
+
"containerTitle": "Approval Rules",
|
|
17
|
+
"buttons": {
|
|
18
|
+
"newRule": "Add New Rule"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"alertMessages": {
|
|
22
|
+
"header": {
|
|
23
|
+
"approve": "Approve Purchase Orders",
|
|
24
|
+
"reject": "Reject Purchase Orders",
|
|
25
|
+
"error": "Error"
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"approve": "The selected purchase orders were approved successfully.",
|
|
29
|
+
"reject": "The selected purchase orders were rejected successfully.",
|
|
30
|
+
"error": "An error occurred while processing your request."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"purchaseOrdersTable": {
|
|
34
|
+
"noPurchaseOrders": {
|
|
35
|
+
"default": "No purchase orders found."
|
|
36
|
+
},
|
|
37
|
+
"pagination": {
|
|
38
|
+
"status": "Items {{from}} to {{to}} of {{total}} total",
|
|
39
|
+
"pageSizeLabel": {
|
|
40
|
+
"start": "Show",
|
|
41
|
+
"end": "per page"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"loading": "Loading purchase orders...",
|
|
45
|
+
"actionView": "View",
|
|
46
|
+
"actionEdit": "Edit",
|
|
47
|
+
"actionDelete": "Delete",
|
|
48
|
+
"rulesStatus": {
|
|
49
|
+
"enabled": "Enabled",
|
|
50
|
+
"disabled": "Disabled"
|
|
51
|
+
},
|
|
52
|
+
"ruleTypes": {
|
|
53
|
+
"grand_total": "Grand Total",
|
|
54
|
+
"number_of_skus": "Number of SKUs",
|
|
55
|
+
"any_item": "Any Item",
|
|
56
|
+
"all_items": "All Items"
|
|
57
|
+
},
|
|
58
|
+
"appliesToAll": "All",
|
|
59
|
+
"statusOrder": {
|
|
60
|
+
"order_placed": "Order placed",
|
|
61
|
+
"order_failed": "Order failed",
|
|
62
|
+
"pending": "Pending",
|
|
63
|
+
"approved": "Approved",
|
|
64
|
+
"rejected": "Rejected",
|
|
65
|
+
"canceled": "Canceled",
|
|
66
|
+
"order_in_progress": "Order in progress",
|
|
67
|
+
"approval_required": "Approval required",
|
|
68
|
+
"approved_pending_payment": "Approved pending Payment"
|
|
69
|
+
},
|
|
70
|
+
"tableColumns": {
|
|
71
|
+
"poNumber": "PO #",
|
|
72
|
+
"orderNumber": "Order #",
|
|
73
|
+
"createdDate": "Created",
|
|
74
|
+
"updatedDate": "Updated",
|
|
75
|
+
"createdBy": "Created By",
|
|
76
|
+
"status": "Status",
|
|
77
|
+
"total": "Total",
|
|
78
|
+
"action": "Action",
|
|
79
|
+
"ruleName": "Rule Name",
|
|
80
|
+
"ruleType": "Rule Type",
|
|
81
|
+
"appliesTo": "Applies To",
|
|
82
|
+
"approver": "Approver",
|
|
83
|
+
"selectAllAriaLabel": "Select all not approved purchase orders"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
;
|
|
4
89
|
|
|
5
90
|
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* Converts camelCase object keys to snake_case recursively
|
|
19
|
+
*/
|
|
20
|
+
export declare const toSnakeCase: (obj: any) => any;
|
|
21
|
+
/**
|
|
22
|
+
* Converts snake_case object keys to camelCase recursively
|
|
23
|
+
*/
|
|
24
|
+
export declare const toCamelCase: (obj: any) => any;
|
|
25
|
+
//# sourceMappingURL=case-converter.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/** Actions */
|
|
18
|
+
export declare const handleFetchError: (errors: Array<{
|
|
19
|
+
message: string;
|
|
20
|
+
}>) => never;
|
|
21
|
+
//# sourceMappingURL=fetch-error.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* Format a date string to a localized format like "Sep 8, 2025 6:32:13 AM"
|
|
19
|
+
* @param dateString - ISO date string or date string
|
|
20
|
+
* @param locale - Locale for formatting (defaults to 'en-US')
|
|
21
|
+
* @returns Formatted date string
|
|
22
|
+
*/
|
|
23
|
+
export declare const formatDate: (dateString: string, locale?: string) => string;
|
|
24
|
+
//# sourceMappingURL=formatDate.d.ts.map
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* A function which can be attached to fetchGraphQL to handle thrown errors in
|
|
19
|
+
* a generic way.
|
|
20
|
+
*/
|
|
21
|
+
export declare const handleNetworkError: (error: Error) => never;
|
|
22
|
+
//# sourceMappingURL=network-error.d.ts.map
|