@mercurjs/admin 2.3.1 → 2.3.2-canary.1
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/{add-campaign-promotions-S4HKMFU7.js → add-campaign-promotions-NZ62V2LH.js} +3 -3
- package/dist/{adjust-inventory-CFQ6LD2U.js → adjust-inventory-BBAU3NMM.js} +1 -1
- package/dist/{campaign-detail-WPTZDDD5.js → campaign-detail-KZWQLIS5.js} +4 -4
- package/dist/{chunk-7PGZV6DQ.js → chunk-3W4T2KGY.js} +1 -1
- package/dist/{chunk-VKVK5D2F.js → chunk-4KULFU3V.js} +1 -1
- package/dist/{chunk-NKZLCOFU.js → chunk-ADI5XIXM.js} +1 -1
- package/dist/{chunk-6ZVRNI5K.js → chunk-AV6HBMRX.js} +1 -1
- package/dist/{chunk-7ZY7R6PG.js → chunk-GYHF5XBU.js} +1 -1
- package/dist/{chunk-H7HNJFQA.js → chunk-MIVPIACG.js} +1 -1
- package/dist/{chunk-NN6PSWE4.js → chunk-OQLWF43Y.js} +5 -1
- package/dist/{chunk-6XJUYY6G.js → chunk-PNLDVYCP.js} +1 -1
- package/dist/chunk-PVEB24HU.js +208 -0
- package/dist/{chunk-N5IUYCUZ.js → chunk-UYQY4B7J.js} +4 -2
- package/dist/{collection-edit-3ZZCDIUY.js → collection-edit-HMOZIS7Z.js} +1 -1
- package/dist/{collection-list-LM5SH67K.js → collection-list-GMAYML6Z.js} +1 -1
- package/dist/{customer-edit-RBPGTG32.js → customer-edit-5EH2AUGN.js} +1 -1
- package/dist/{customer-group-edit-A74OFHEH.js → customer-group-edit-ZQTBUZVR.js} +1 -1
- package/dist/{edit-inventory-item-JLTBJEVA.js → edit-inventory-item-ZSV4WF6G.js} +1 -1
- package/dist/{edit-inventory-item-attributes-BENAJP4P.js → edit-inventory-item-attributes-NWSAQMKX.js} +1 -1
- package/dist/{edit-reservation-FVJZ2NRW.js → edit-reservation-W3THLKKK.js} +1 -1
- package/dist/{edit-rules-BVZS6GBQ.js → edit-rules-RJC3AYJN.js} +1 -1
- package/dist/index.js +96 -68
- package/dist/{location-edit-TQFZN2RW.js → location-edit-XRGRJCVB.js} +1 -1
- package/dist/{location-service-zone-edit-36TATZI4.js → location-service-zone-edit-KFG52K4W.js} +1 -1
- package/dist/{location-service-zone-shipping-option-edit-HOEBC3D6.js → location-service-zone-shipping-option-edit-UUIR7B5S.js} +2 -2
- package/dist/{manage-locations-5CF36BYN.js → manage-locations-ZFIRHMNH.js} +1 -1
- package/dist/{marketplace-edit-GWOPSYXL.js → marketplace-edit-G7YNGABC.js} +1 -1
- package/dist/{order-create-refund-4MKAZL7C.js → order-create-refund-FJLL4CUD.js} +1 -1
- package/dist/{order-edit-billing-address-5OYY6SEI.js → order-edit-billing-address-QCVPGEL6.js} +2 -2
- package/dist/{order-edit-email-GM3HKYR6.js → order-edit-email-BREEW246.js} +1 -1
- package/dist/{order-edit-shipping-address-ZWGROPKU.js → order-edit-shipping-address-XUG74AFY.js} +1 -1
- package/dist/{order-list-GQ5IOA6I.js → order-list-WGQC2X2L.js} +1 -1
- package/dist/{order-request-transfer-OTGRHY6N.js → order-request-transfer-RYVK4WYW.js} +1 -1
- package/dist/pages/index.js +9 -9
- package/dist/{price-list-edit-ZZZDR62K.js → price-list-edit-ZVP6CCPE.js} +1 -1
- package/dist/{product-create-A7774JYE.js → product-create-QS5KIHET.js} +3 -3
- package/dist/{product-create-attribute-2PTO2UCX.js → product-create-attribute-FC26KQN4.js} +1 -1
- package/dist/{product-media-ROKDXANO.js → product-media-UHDJ6RSG.js} +2 -2
- package/dist/{product-organization-XS62HARL.js → product-organization-IX5XCZW4.js} +1 -1
- package/dist/{product-tag-detail-7P7MI52E.js → product-tag-detail-2YR6TXZI.js} +1 -1
- package/dist/{product-tag-list-43NFD36I.js → product-tag-list-3HOXFHMN.js} +1 -1
- package/dist/{product-type-edit-IEMK45NK.js → product-type-edit-X7VSBPUG.js} +1 -1
- package/dist/{promotion-add-campaign-TVTKI5EP.js → promotion-add-campaign-VAF3HTLK.js} +1 -1
- package/dist/{promotion-detail-4WNHEOG4.js → promotion-detail-ADTUSGD4.js} +3 -3
- package/dist/{promotion-edit-details-FFTEJ2CV.js → promotion-edit-details-7PHH756U.js} +1 -1
- package/dist/{promotion-list-AJ5NBDZ2.js → promotion-list-MRNS47TP.js} +4 -4
- package/dist/{refund-reason-list-R573DHM7.js → refund-reason-list-ODOF3ZLM.js} +1 -1
- package/dist/{region-edit-N6FXU7NY.js → region-edit-NUMG2V5L.js} +1 -1
- package/dist/{reset-password-7G75C4RO.js → reset-password-N4LXTU3G.js} +1 -1
- package/dist/{return-reason-list-A2RABTGP.js → return-reason-list-AVCC44CH.js} +1 -1
- package/dist/{sales-channel-edit-2SCFS7SA.js → sales-channel-edit-CO2V2VER.js} +1 -1
- package/dist/{shipping-option-type-edit-6PWBHHFP.js → shipping-option-type-edit-WXTEQM32.js} +1 -1
- package/dist/{store-details-GOVF3KFW.js → store-details-KI5D4VSI.js} +1 -1
- package/dist/{store-edit-IP6FR2NJ.js → store-edit-B54LFFLE.js} +3 -3
- package/dist/{store-list-OKKZA7VO.js → store-list-3KZCD7UB.js} +1 -1
- package/dist/{store-member-invite-RKP7K2S4.js → store-member-invite-5S64PDTE.js} +1 -1
- package/dist/{tax-region-create-P4IKQNTU.js → tax-region-create-DVBIX7IX.js} +1 -1
- package/dist/{tax-region-tax-override-create-7O3KDBUJ.js → tax-region-tax-override-create-XZ5BU2FP.js} +1 -1
- package/dist/{tax-region-tax-override-edit-SUL5VZ5D.js → tax-region-tax-override-edit-R4EGIUIZ.js} +1 -1
- package/dist/{user-edit-Z3ODTSMN.js → user-edit-O2M5II52.js} +1 -1
- package/dist/{user-invite-WG57KWD3.js → user-invite-WHBNPT4I.js} +127 -27
- package/package.json +6 -6
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePromotionTableColumns,
|
|
3
3
|
usePromotionTableQuery
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GYHF5XBU.js";
|
|
5
5
|
import {
|
|
6
6
|
usePromotionTableFilters
|
|
7
7
|
} from "./chunk-J4SYK3RT.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-ADI5XIXM.js";
|
|
9
9
|
import "./chunk-JHIMVLB2.js";
|
|
10
10
|
import "./chunk-MDABSESI.js";
|
|
11
11
|
import "./chunk-FMFVTERD.js";
|
|
12
12
|
import "./chunk-PHOCVOZ5.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-OQLWF43Y.js";
|
|
14
14
|
import "./chunk-TKGWSUEI.js";
|
|
15
15
|
import {
|
|
16
16
|
KeyboundForm
|
|
@@ -252,7 +252,7 @@ var AdjustInventoryDrawer = () => {
|
|
|
252
252
|
throw error;
|
|
253
253
|
}
|
|
254
254
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { "data-testid": "inventory-adjust-inventory-drawer", children: [
|
|
255
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { "data-testid": "inventory-adjust-inventory-drawer-header", children: /* @__PURE__ */ jsx2(Heading, { "data-testid": "inventory-adjust-inventory-drawer-title", children: t("inventory.manageLocationQuantity") }) }),
|
|
255
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Header, { "data-testid": "inventory-adjust-inventory-drawer-header", children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { "data-testid": "inventory-adjust-inventory-drawer-title", children: t("inventory.manageLocationQuantity") }) }) }),
|
|
256
256
|
ready && /* @__PURE__ */ jsx2(
|
|
257
257
|
AdjustInventoryForm,
|
|
258
258
|
{
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CAMPAIGN_DETAIL_FIELDS,
|
|
3
3
|
CampaignDetailPage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AV6HBMRX.js";
|
|
5
5
|
import "./chunk-WP3B4NEU.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-GYHF5XBU.js";
|
|
7
7
|
import "./chunk-J4SYK3RT.js";
|
|
8
8
|
import "./chunk-RK5N3XIX.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-ADI5XIXM.js";
|
|
10
10
|
import "./chunk-JHIMVLB2.js";
|
|
11
11
|
import "./chunk-MDABSESI.js";
|
|
12
12
|
import "./chunk-FMFVTERD.js";
|
|
13
13
|
import "./chunk-PHOCVOZ5.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-OQLWF43Y.js";
|
|
15
15
|
import "./chunk-E74OUNA3.js";
|
|
16
16
|
import "./chunk-H6MYB7GB.js";
|
|
17
17
|
import "./chunk-THHRRYRS.js";
|
|
@@ -15666,7 +15666,11 @@ var en_default = {
|
|
|
15666
15666
|
},
|
|
15667
15667
|
deleteUserWarning: "You are about to delete the user {{name}}. This action cannot be undone.",
|
|
15668
15668
|
deleteUserSuccess: "User {{name}} was successfully removed.",
|
|
15669
|
-
invite: "Invite"
|
|
15669
|
+
invite: "Invite",
|
|
15670
|
+
inviteRolesTooltip: "If no role is selected, the user will be invited with a superuser role."
|
|
15671
|
+
},
|
|
15672
|
+
roles: {
|
|
15673
|
+
domain: "Roles"
|
|
15670
15674
|
},
|
|
15671
15675
|
marketplace: {
|
|
15672
15676
|
domain: "Marketplace",
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
sdk
|
|
4
|
+
} from "./chunk-DTGEFKK4.js";
|
|
5
|
+
|
|
6
|
+
// src/providers/feature-flag-provider/index.tsx
|
|
7
|
+
import { createContext, useCallback, useContext, useMemo } from "react";
|
|
8
|
+
|
|
9
|
+
// src/hooks/api/feature-flags.tsx
|
|
10
|
+
import { useQuery } from "@tanstack/react-query";
|
|
11
|
+
var useFeatureFlags = () => {
|
|
12
|
+
return useQuery({
|
|
13
|
+
queryKey: ["admin", "feature-flags"],
|
|
14
|
+
queryFn: async () => {
|
|
15
|
+
const response = await fetchQuery("/admin/feature-flags", {
|
|
16
|
+
method: "GET"
|
|
17
|
+
});
|
|
18
|
+
return response.feature_flags;
|
|
19
|
+
},
|
|
20
|
+
staleTime: 5 * 60 * 1e3,
|
|
21
|
+
gcTime: 10 * 60 * 1e3
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// src/providers/feature-flag-provider/index.tsx
|
|
26
|
+
import { jsx } from "react/jsx-runtime";
|
|
27
|
+
var FeatureFlagContext = createContext(null);
|
|
28
|
+
var useFeatureFlag = (flag) => {
|
|
29
|
+
const context = useContext(FeatureFlagContext);
|
|
30
|
+
if (!context) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
return context.isFeatureEnabled(flag);
|
|
34
|
+
};
|
|
35
|
+
var FeatureFlagProvider = ({
|
|
36
|
+
children
|
|
37
|
+
}) => {
|
|
38
|
+
const { data: flags = {}, isLoading } = useFeatureFlags();
|
|
39
|
+
const isFeatureEnabled = useCallback(
|
|
40
|
+
(flag) => {
|
|
41
|
+
return flags[flag] === true;
|
|
42
|
+
},
|
|
43
|
+
[flags]
|
|
44
|
+
);
|
|
45
|
+
const value = useMemo(
|
|
46
|
+
() => ({ flags, isLoading, isFeatureEnabled }),
|
|
47
|
+
[flags, isLoading, isFeatureEnabled]
|
|
48
|
+
);
|
|
49
|
+
return /* @__PURE__ */ jsx(FeatureFlagContext.Provider, { value, children });
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// src/providers/permissions-provider/permissions-context.tsx
|
|
53
|
+
import { createContext as createContext2 } from "react";
|
|
54
|
+
var PermissionsContext = createContext2(null);
|
|
55
|
+
|
|
56
|
+
// src/providers/permissions-provider/permissions-provider.tsx
|
|
57
|
+
import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
58
|
+
|
|
59
|
+
// src/lib/permissions/constants.ts
|
|
60
|
+
var OPERATION_IMPLICATIONS = {
|
|
61
|
+
read: ["read"],
|
|
62
|
+
create: ["create"],
|
|
63
|
+
update: ["update"],
|
|
64
|
+
delete: ["delete"],
|
|
65
|
+
"*": ["read", "create", "update", "delete", "*"]
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// src/lib/permissions/utils.ts
|
|
69
|
+
function parsePermission(permission) {
|
|
70
|
+
const parts = permission.split(":");
|
|
71
|
+
if (parts.length !== 2) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
const [resource, operation] = parts;
|
|
75
|
+
return {
|
|
76
|
+
resource,
|
|
77
|
+
operation
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function buildPermission(resource, operation) {
|
|
81
|
+
return `${resource}:${operation}`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// src/providers/permissions-provider/permissions-provider.tsx
|
|
85
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
86
|
+
var PermissionsProvider = ({
|
|
87
|
+
policy,
|
|
88
|
+
isLoading = false,
|
|
89
|
+
isRbacEnabled = true,
|
|
90
|
+
children
|
|
91
|
+
}) => {
|
|
92
|
+
const permissionsMap = useMemo2(() => {
|
|
93
|
+
const index = /* @__PURE__ */ Object.create(null);
|
|
94
|
+
for (const granted of policy?.permissions ?? []) {
|
|
95
|
+
const parsed = parsePermission(granted);
|
|
96
|
+
if (!parsed) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const { resource, operation } = parsed;
|
|
100
|
+
const impliedOperations = OPERATION_IMPLICATIONS[operation] || [operation];
|
|
101
|
+
for (const impliedOperation of impliedOperations) {
|
|
102
|
+
index[buildPermission(resource, impliedOperation)] = true;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return index;
|
|
106
|
+
}, [policy]);
|
|
107
|
+
const hasPermission = useCallback2(
|
|
108
|
+
(permission) => {
|
|
109
|
+
if (!isRbacEnabled) {
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
return !!permissionsMap[permission];
|
|
113
|
+
},
|
|
114
|
+
[isRbacEnabled, permissionsMap]
|
|
115
|
+
);
|
|
116
|
+
const hasAnyPermission = useCallback2(
|
|
117
|
+
(permissions) => {
|
|
118
|
+
if (!isRbacEnabled) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
if (!permissions?.length) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
return permissions.some(hasPermission);
|
|
125
|
+
},
|
|
126
|
+
[isRbacEnabled, hasPermission]
|
|
127
|
+
);
|
|
128
|
+
const hasAllPermissions = useCallback2(
|
|
129
|
+
(permissions) => {
|
|
130
|
+
if (!isRbacEnabled) {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
if (!permissions?.length) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
return permissions.every(hasPermission);
|
|
137
|
+
},
|
|
138
|
+
[isRbacEnabled, hasPermission]
|
|
139
|
+
);
|
|
140
|
+
const can = useCallback2(
|
|
141
|
+
(resource, operation) => {
|
|
142
|
+
if (!isRbacEnabled) {
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
return !!permissionsMap[buildPermission(resource, operation)];
|
|
146
|
+
},
|
|
147
|
+
[isRbacEnabled, permissionsMap]
|
|
148
|
+
);
|
|
149
|
+
const value = useMemo2(
|
|
150
|
+
() => ({
|
|
151
|
+
policy,
|
|
152
|
+
isLoading,
|
|
153
|
+
hasPermission,
|
|
154
|
+
hasAnyPermission,
|
|
155
|
+
hasAllPermissions,
|
|
156
|
+
can
|
|
157
|
+
}),
|
|
158
|
+
[policy, isLoading, hasPermission, hasAnyPermission, hasAllPermissions, can]
|
|
159
|
+
);
|
|
160
|
+
return /* @__PURE__ */ jsx2(PermissionsContext.Provider, { value, children });
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
// src/providers/permissions-provider/use-permissions.tsx
|
|
164
|
+
import { useContext as useContext2 } from "react";
|
|
165
|
+
var usePermissions = () => {
|
|
166
|
+
const context = useContext2(PermissionsContext);
|
|
167
|
+
if (!context) {
|
|
168
|
+
throw new Error(
|
|
169
|
+
"usePermissions must be used within a PermissionsProvider"
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
return context;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// src/hooks/api/rbac-roles.tsx
|
|
176
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
177
|
+
var ME_PERMISSIONS_QUERY_KEY = ["rbac_me_permissions"];
|
|
178
|
+
var mePermissionsQueryKey = ME_PERMISSIONS_QUERY_KEY;
|
|
179
|
+
var useMePermissions = (options) => {
|
|
180
|
+
return useQuery2({
|
|
181
|
+
queryFn: () => sdk.admin.rbac.me.permissions.query(
|
|
182
|
+
{}
|
|
183
|
+
),
|
|
184
|
+
queryKey: mePermissionsQueryKey,
|
|
185
|
+
staleTime: 5 * 60 * 1e3,
|
|
186
|
+
...options
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
var ASSIGNABLE_ROLES_QUERY_KEY = ["rbac_assignable_roles"];
|
|
190
|
+
var useRbacAssignableRoles = (query, options) => {
|
|
191
|
+
return useQuery2({
|
|
192
|
+
queryFn: () => sdk.admin.rbac.roles.assignable.query({
|
|
193
|
+
...query
|
|
194
|
+
}),
|
|
195
|
+
queryKey: [...ASSIGNABLE_ROLES_QUERY_KEY, query],
|
|
196
|
+
staleTime: 5 * 60 * 1e3,
|
|
197
|
+
...options
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export {
|
|
202
|
+
useFeatureFlag,
|
|
203
|
+
FeatureFlagProvider,
|
|
204
|
+
PermissionsProvider,
|
|
205
|
+
usePermissions,
|
|
206
|
+
useMePermissions,
|
|
207
|
+
useRbacAssignableRoles
|
|
208
|
+
};
|
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
// src/hooks/table/query/use-user-invite-table-query.tsx
|
|
6
6
|
var useUserInviteTableQuery = ({
|
|
7
7
|
prefix,
|
|
8
|
-
pageSize = 20
|
|
8
|
+
pageSize = 20,
|
|
9
|
+
fields
|
|
9
10
|
}) => {
|
|
10
11
|
const queryObject = useQueryParams(
|
|
11
12
|
["offset", "q", "order", "created_at", "updated_at"],
|
|
@@ -18,7 +19,8 @@ var useUserInviteTableQuery = ({
|
|
|
18
19
|
order,
|
|
19
20
|
created_at: created_at ? JSON.parse(created_at) : void 0,
|
|
20
21
|
updated_at: updated_at ? JSON.parse(updated_at) : void 0,
|
|
21
|
-
q
|
|
22
|
+
q,
|
|
23
|
+
fields
|
|
22
24
|
};
|
|
23
25
|
return {
|
|
24
26
|
searchParams,
|
|
@@ -136,7 +136,7 @@ var CollectionEdit = () => {
|
|
|
136
136
|
throw error;
|
|
137
137
|
}
|
|
138
138
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
|
|
139
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(Heading, { children: t("collections.editCollection") }) }),
|
|
139
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("collections.editCollection") }) }) }),
|
|
140
140
|
!isLoading && collection && /* @__PURE__ */ jsx2(EditCollectionForm, { collection })
|
|
141
141
|
] });
|
|
142
142
|
};
|
|
@@ -15,7 +15,7 @@ import "./chunk-ANDTD5VV.js";
|
|
|
15
15
|
import "./chunk-MG4GKUJW.js";
|
|
16
16
|
import "./chunk-AYVH6Q5O.js";
|
|
17
17
|
import "./chunk-VOHEQ7B5.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-UYQY4B7J.js";
|
|
19
19
|
import "./chunk-7SVLKK6Q.js";
|
|
20
20
|
import "./chunk-GR6JUIRU.js";
|
|
21
21
|
import "./chunk-GRH7C3QN.js";
|
|
@@ -202,7 +202,7 @@ var CustomerEdit = () => {
|
|
|
202
202
|
throw error;
|
|
203
203
|
}
|
|
204
204
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
|
|
205
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(Heading, { children: t("customers.edit.header") }) }),
|
|
205
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("customers.edit.header") }) }) }),
|
|
206
206
|
!isLoading && customer && /* @__PURE__ */ jsx2(EditCustomerForm, { customer })
|
|
207
207
|
] });
|
|
208
208
|
};
|
|
@@ -121,7 +121,7 @@ var CustomerGroupEdit = () => {
|
|
|
121
121
|
throw error;
|
|
122
122
|
}
|
|
123
123
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
|
|
124
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(Heading, { children: t("customerGroups.edit.header") }) }),
|
|
124
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("customerGroups.edit.header") }) }) }),
|
|
125
125
|
!isLoading && customer_group && /* @__PURE__ */ jsx2(EditCustomerGroupForm, { group: customer_group })
|
|
126
126
|
] });
|
|
127
127
|
};
|
|
@@ -164,7 +164,7 @@ var InventoryItemEdit = () => {
|
|
|
164
164
|
throw error;
|
|
165
165
|
}
|
|
166
166
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { "data-testid": "inventory-edit-item-drawer", children: [
|
|
167
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { "data-testid": "inventory-edit-item-drawer-header", children: /* @__PURE__ */ jsx2(Heading, { "data-testid": "inventory-edit-item-drawer-title", children: t("inventory.editItemDetails") }) }),
|
|
167
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Header, { "data-testid": "inventory-edit-item-drawer-header", children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { "data-testid": "inventory-edit-item-drawer-title", children: t("inventory.editItemDetails") }) }) }),
|
|
168
168
|
ready && /* @__PURE__ */ jsx2(EditInventoryItemForm, { item: inventoryItem })
|
|
169
169
|
] });
|
|
170
170
|
};
|
|
@@ -321,7 +321,7 @@ var InventoryItemAttributesEdit = () => {
|
|
|
321
321
|
throw error;
|
|
322
322
|
}
|
|
323
323
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { "data-testid": "inventory-edit-item-attributes-drawer", children: [
|
|
324
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { "data-testid": "inventory-edit-item-attributes-drawer-header", children: /* @__PURE__ */ jsx2(Heading, { "data-testid": "inventory-edit-item-attributes-drawer-title", children: t("products.editAttributes") }) }),
|
|
324
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Header, { "data-testid": "inventory-edit-item-attributes-drawer-header", children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { "data-testid": "inventory-edit-item-attributes-drawer-title", children: t("products.editAttributes") }) }) }),
|
|
325
325
|
ready && /* @__PURE__ */ jsx2(EditInventoryItemAttributesForm, { item: inventoryItem })
|
|
326
326
|
] });
|
|
327
327
|
};
|
|
@@ -297,7 +297,7 @@ var ReservationEdit = () => {
|
|
|
297
297
|
throw error;
|
|
298
298
|
}
|
|
299
299
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
|
|
300
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(Heading, { children: t("inventory.reservation.editItemDetails") }) }),
|
|
300
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("inventory.reservation.editItemDetails") }) }) }),
|
|
301
301
|
ready && /* @__PURE__ */ jsx2(
|
|
302
302
|
EditReservationForm,
|
|
303
303
|
{
|
|
@@ -321,7 +321,7 @@ var EditRules2 = () => {
|
|
|
321
321
|
throw error;
|
|
322
322
|
}
|
|
323
323
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { "data-testid": `promotion-edit-rules-${ruleType}`, children: [
|
|
324
|
-
/* @__PURE__ */ jsx3(RouteDrawer.Header, { "data-testid": `promotion-edit-rules-header-${ruleType}`, children: /* @__PURE__ */ jsx3(Heading, { "data-testid": `promotion-edit-rules-heading-${ruleType}`, children: t(`promotions.edit.${ruleType}.title`) }) }),
|
|
324
|
+
/* @__PURE__ */ jsx3(RouteDrawer.Header, { "data-testid": `promotion-edit-rules-header-${ruleType}`, children: /* @__PURE__ */ jsx3(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx3(Heading, { "data-testid": `promotion-edit-rules-heading-${ruleType}`, children: t(`promotions.edit.${ruleType}.title`) }) }) }),
|
|
325
325
|
!isLoading && promotion && /* @__PURE__ */ jsx3(
|
|
326
326
|
EditRulesWrapper,
|
|
327
327
|
{
|