@aglyn/plugins-commerce 1.0.0-beta.270 → 1.0.0-beta.272
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/package.json +13 -13
- package/src/lib/components/console/entitlement-gate.component.d.ts +11 -16
- package/src/lib/components/console/entitlement-gate.component.js +15 -25
- package/src/lib/components/console/entitlement-gate.component.js.map +1 -1
- package/src/lib/native-nav.js +1 -1
- package/src/lib/native-nav.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aglyn/plugins-commerce",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.272",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://aglyn.com",
|
|
6
6
|
"repository": {
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aglyn/aglyn": "1.0.0-beta.
|
|
29
|
-
"@aglyn/shared-data-mdi": "1.0.0-beta.
|
|
30
|
-
"@aglyn/shared-ui-jsx": "1.0.0-beta.
|
|
31
|
-
"@aglyn/shared-ui-next": "1.0.0-beta.
|
|
32
|
-
"@aglyn/shared-ui-snackstack": "1.0.0-beta.
|
|
33
|
-
"@aglyn/shared-util-email": "1.0.0-beta.
|
|
34
|
-
"@aglyn/shared-util-http": "1.0.0-beta.
|
|
35
|
-
"@aglyn/shared-util-timestamp": "1.0.0-beta.
|
|
36
|
-
"@aglyn/shared-util-tools": "1.0.0-beta.
|
|
37
|
-
"@aglyn/tenant-data-admin": "1.0.0-beta.
|
|
38
|
-
"@aglyn/tenant-feature-instance": "1.0.0-beta.
|
|
39
|
-
"@aglyn/tenant-runtime": "1.0.0-beta.
|
|
28
|
+
"@aglyn/aglyn": "1.0.0-beta.272",
|
|
29
|
+
"@aglyn/shared-data-mdi": "1.0.0-beta.272",
|
|
30
|
+
"@aglyn/shared-ui-jsx": "1.0.0-beta.272",
|
|
31
|
+
"@aglyn/shared-ui-next": "1.0.0-beta.272",
|
|
32
|
+
"@aglyn/shared-ui-snackstack": "1.0.0-beta.272",
|
|
33
|
+
"@aglyn/shared-util-email": "1.0.0-beta.272",
|
|
34
|
+
"@aglyn/shared-util-http": "1.0.0-beta.272",
|
|
35
|
+
"@aglyn/shared-util-timestamp": "1.0.0-beta.272",
|
|
36
|
+
"@aglyn/shared-util-tools": "1.0.0-beta.272",
|
|
37
|
+
"@aglyn/tenant-data-admin": "1.0.0-beta.272",
|
|
38
|
+
"@aglyn/tenant-feature-instance": "1.0.0-beta.272",
|
|
39
|
+
"@aglyn/tenant-runtime": "1.0.0-beta.272",
|
|
40
40
|
"@stripe/react-stripe-js": "^6.12.0",
|
|
41
41
|
"@stripe/stripe-js": "^9.17.0",
|
|
42
42
|
"@swc/helpers": "0.5.23",
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import type { OrgFeatureFlags } from '@aglyn/aglyn';
|
|
2
2
|
import { type HelpTipContent } from '@aglyn/shared-ui-jsx';
|
|
3
|
+
import { type PlanUpsellNoticeProps } from '@aglyn/shared-ui-jsx/components/plan-upsell-notice.component';
|
|
3
4
|
import type { ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** Cheapest plan carrying the feature — "Business". */
|
|
11
|
-
planLabel: string | undefined;
|
|
12
|
-
}
|
|
5
|
+
import { type PlanFeatureLock } from '@aglyn/tenant-feature-instance/hooks/plan-feature-lock';
|
|
6
|
+
/**
|
|
7
|
+
* The shared plan-lock state (AGL-3977), under the name commerce's surfaces
|
|
8
|
+
* already import.
|
|
9
|
+
*/
|
|
10
|
+
export type CommerceEntitlementState = PlanFeatureLock;
|
|
13
11
|
/**
|
|
14
12
|
* The three-state entitlement read every commerce console surface needs
|
|
15
13
|
* (AGL-2080), factored out of the copy-pasted pair that
|
|
@@ -24,15 +22,12 @@ export interface CommerceEntitlementState {
|
|
|
24
22
|
*
|
|
25
23
|
* `planLabel` comes from `planGrantingFeature`, derived from
|
|
26
24
|
* `PLAN_ENTITLEMENTS` on every call, so the upsell can never name a tier
|
|
27
|
-
* that no longer carries the feature.
|
|
25
|
+
* that no longer carries the feature. The answer itself is the shared
|
|
26
|
+
* `resolvePlanFeatureLock`, so commerce's locks read like every other
|
|
27
|
+
* console surface's.
|
|
28
28
|
*/
|
|
29
29
|
export declare function useCommerceEntitlement(hostId: string | undefined, feature: keyof OrgFeatureFlags): CommerceEntitlementState;
|
|
30
|
-
export
|
|
31
|
-
/** What the feature is and what it does, in the operator's terms. */
|
|
32
|
-
children: ReactNode;
|
|
33
|
-
planLabel: string | undefined;
|
|
34
|
-
upgradeHref: string | undefined;
|
|
35
|
-
}
|
|
30
|
+
export type EntitlementUpsellProps = PlanUpsellNoticeProps;
|
|
36
31
|
/**
|
|
37
32
|
* The locked-state notice: what the feature is, which plan carries it, and
|
|
38
33
|
* one click to the plan grid.
|
|
@@ -14,11 +14,13 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/ 'use client';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
17
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
18
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
+
import { CardDisplay } from "@aglyn/shared-ui-jsx";
|
|
20
|
+
import { PlanUpsellNotice } from "@aglyn/shared-ui-jsx/components/plan-upsell-notice.component";
|
|
21
|
+
import { Typography } from "@mui/material";
|
|
21
22
|
import { useConsoleHostRoute, useOrgPlan } from "@aglyn/tenant-feature-instance";
|
|
23
|
+
import { resolvePlanFeatureLock } from "@aglyn/tenant-feature-instance/hooks/plan-feature-lock";
|
|
22
24
|
/**
|
|
23
25
|
* The three-state entitlement read every commerce console surface needs
|
|
24
26
|
* (AGL-2080), factored out of the copy-pasted pair that
|
|
@@ -33,16 +35,18 @@ import { useConsoleHostRoute, useOrgPlan } from "@aglyn/tenant-feature-instance"
|
|
|
33
35
|
*
|
|
34
36
|
* `planLabel` comes from `planGrantingFeature`, derived from
|
|
35
37
|
* `PLAN_ENTITLEMENTS` on every call, so the upsell can never name a tier
|
|
36
|
-
* that no longer carries the feature.
|
|
38
|
+
* that no longer carries the feature. The answer itself is the shared
|
|
39
|
+
* `resolvePlanFeatureLock`, so commerce's locks read like every other
|
|
40
|
+
* console surface's.
|
|
37
41
|
*/ export function useCommerceEntitlement(hostId, feature) {
|
|
38
42
|
const consoleRoute = useConsoleHostRoute(hostId);
|
|
39
43
|
const { org, ready } = useOrgPlan(hostId);
|
|
40
|
-
return {
|
|
44
|
+
return resolvePlanFeatureLock({
|
|
45
|
+
org,
|
|
41
46
|
ready,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
47
|
+
feature,
|
|
48
|
+
orgSlug: consoleRoute.orgSlug
|
|
49
|
+
});
|
|
46
50
|
}
|
|
47
51
|
/**
|
|
48
52
|
* The locked-state notice: what the feature is, which plan carries it, and
|
|
@@ -53,21 +57,7 @@ import { useConsoleHostRoute, useOrgPlan } from "@aglyn/tenant-feature-instance"
|
|
|
53
57
|
* asks to keep prominent and one-click. Always `AppLink` — a MUI `href`
|
|
54
58
|
* bypasses the client router and full-reloads the console.
|
|
55
59
|
*/ export function EntitlementUpsell(props) {
|
|
56
|
-
|
|
57
|
-
return /*#__PURE__*/ _jsxs(Alert, {
|
|
58
|
-
severity: "info",
|
|
59
|
-
action: upgradeHref ? /*#__PURE__*/ _jsx(AppLink, {
|
|
60
|
-
componentVariant: "button",
|
|
61
|
-
color: "inherit",
|
|
62
|
-
size: "small",
|
|
63
|
-
href: upgradeHref,
|
|
64
|
-
children: 'Upgrade'
|
|
65
|
-
}) : undefined,
|
|
66
|
-
children: [
|
|
67
|
-
children,
|
|
68
|
-
planLabel ? ` Included from ${planLabel}.` : null
|
|
69
|
-
]
|
|
70
|
-
});
|
|
60
|
+
return /*#__PURE__*/ _jsx(PlanUpsellNotice, _extends({}, props));
|
|
71
61
|
}
|
|
72
62
|
/**
|
|
73
63
|
* A whole console card behind an entitlement (AGL-2080).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../libs/plugins/commerce/src/lib/components/console/entitlement-gate.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/plugins/commerce/src/lib/components/console/entitlement-gate.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport type { OrgFeatureFlags } from '@aglyn/aglyn'\nimport { CardDisplay, type HelpTipContent } from '@aglyn/shared-ui-jsx'\nimport {\n PlanUpsellNotice,\n type PlanUpsellNoticeProps,\n} from '@aglyn/shared-ui-jsx/components/plan-upsell-notice.component'\nimport { Typography } from '@mui/material'\nimport type { ReactNode } from 'react'\nimport { useConsoleHostRoute, useOrgPlan } from '@aglyn/tenant-feature-instance'\nimport {\n resolvePlanFeatureLock,\n type PlanFeatureLock,\n} from '@aglyn/tenant-feature-instance/hooks/plan-feature-lock'\n\n/**\n * The shared plan-lock state (AGL-3977), under the name commerce's surfaces\n * already import.\n */\nexport type CommerceEntitlementState = PlanFeatureLock\n\n/**\n * The three-state entitlement read every commerce console surface needs\n * (AGL-2080), factored out of the copy-pasted pair that\n * `CommerceAnalyticsCard` and `CommerceGlanceCard` grew in AGL-2056.\n *\n * Three states, not two. `checkEntitlement(undefined)` resolves the FREE\n * tier rather than \"unknown\", so a surface that refuses on `!entitled`\n * alone shows a paying customer an upgrade prompt for the render or two\n * their org doc is in flight. `ready` is the difference, and it is why this\n * returns a struct rather than a boolean — a boolean is the API that caused\n * the bug.\n *\n * `planLabel` comes from `planGrantingFeature`, derived from\n * `PLAN_ENTITLEMENTS` on every call, so the upsell can never name a tier\n * that no longer carries the feature. The answer itself is the shared\n * `resolvePlanFeatureLock`, so commerce's locks read like every other\n * console surface's.\n */\nexport function useCommerceEntitlement(\n hostId: string | undefined,\n feature: keyof OrgFeatureFlags,\n): CommerceEntitlementState {\n const consoleRoute = useConsoleHostRoute(hostId)\n const { org, ready } = useOrgPlan(hostId)\n return resolvePlanFeatureLock({\n org,\n ready,\n feature,\n orgSlug: consoleRoute.orgSlug,\n })\n}\n\nexport type EntitlementUpsellProps = PlanUpsellNoticeProps\n\n/**\n * The locked-state notice: what the feature is, which plan carries it, and\n * one click to the plan grid.\n *\n * The plan name is not decoration. \"This is a paid feature\" is a dead end;\n * \"this is on Business\" plus an Upgrade button is the upgrade path AGL-1859\n * asks to keep prominent and one-click. Always `AppLink` — a MUI `href`\n * bypasses the client router and full-reloads the console.\n */\nexport function EntitlementUpsell(props: EntitlementUpsellProps) {\n return <PlanUpsellNotice {...props} />\n}\n\nexport interface EntitlementGatedCardProps {\n hostId: string\n feature: keyof OrgFeatureFlags\n header: string\n /**\n * Help affordance for the two branches this component renders itself\n * (AGL-2213).\n *\n * Required, not optional. The entitled branch renders `children`, which is\n * the real card and carries its own help; the branches rendered HERE are\n * \"checking your plan\" and the refusal — and the refusal is the one a\n * reader reaches precisely because they do not have what it takes. That is\n * the branch AGL-2130 found carrying no explanation on two console cards,\n * and an optional prop would let it happen again silently.\n */\n help: HelpTipContent\n /** Locked-state copy: what this does, so the upsell sells something. */\n upsell: ReactNode\n children: ReactNode\n}\n\n/**\n * A whole console card behind an entitlement (AGL-2080).\n *\n * The refusal happens BEFORE the operator can configure anything, which is\n * the entire point: five commerce features were fully configurable by an\n * unentitled org and only failed at checkout — a refusal delivered to the\n * buyer instead of the operator. A warning after configuration would be the\n * same defect with better manners.\n */\nexport function EntitlementGatedCard(props: EntitlementGatedCardProps) {\n const { hostId, feature, header, help, upsell, children } = props\n const { ready, entitled, upgradeHref, planLabel } = useCommerceEntitlement(\n hostId,\n feature,\n )\n\n if (!ready) {\n return (\n <CardDisplay header={header} help={help} contentGutterX contentGutterY>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Checking your plan…'}\n </Typography>\n </CardDisplay>\n )\n }\n\n if (!entitled) {\n return (\n <CardDisplay header={header} help={help} contentGutterX contentGutterY>\n <EntitlementUpsell planLabel={planLabel} upgradeHref={upgradeHref}>\n {upsell}\n </EntitlementUpsell>\n </CardDisplay>\n )\n }\n\n return <>{children}</>\n}\n\nexport default EntitlementGatedCard\n"],"names":["CardDisplay","PlanUpsellNotice","Typography","useConsoleHostRoute","useOrgPlan","resolvePlanFeatureLock","useCommerceEntitlement","hostId","feature","consoleRoute","org","ready","orgSlug","EntitlementUpsell","props","EntitlementGatedCard","header","help","upsell","children","entitled","upgradeHref","planLabel","contentGutterX","contentGutterY","variant","color"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAGA,SAASA,WAAW,QAA6B,uBAAsB;AACvE,SACEC,gBAAgB,QAEX,+DAA8D;AACrE,SAASC,UAAU,QAAQ,gBAAe;AAE1C,SAASC,mBAAmB,EAAEC,UAAU,QAAQ,iCAAgC;AAChF,SACEC,sBAAsB,QAEjB,yDAAwD;AAQ/D;;;;;;;;;;;;;;;;;CAiBC,GACD,OAAO,SAASC,uBACdC,MAA0B,EAC1BC,OAA8B;IAE9B,MAAMC,eAAeN,oBAAoBI;IACzC,MAAM,EAAEG,GAAG,EAAEC,KAAK,EAAE,GAAGP,WAAWG;IAClC,OAAOF,uBAAuB;QAC5BK;QACAC;QACAH;QACAI,SAASH,aAAaG,OAAO;IAC/B;AACF;AAIA;;;;;;;;CAQC,GACD,OAAO,SAASC,kBAAkBC,KAA6B;IAC7D,qBAAO,KAACb,+BAAqBa;AAC/B;AAuBA;;;;;;;;CAQC,GACD,OAAO,SAASC,qBAAqBD,KAAgC;IACnE,MAAM,EAAEP,MAAM,EAAEC,OAAO,EAAEQ,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGL;IAC5D,MAAM,EAAEH,KAAK,EAAES,QAAQ,EAAEC,WAAW,EAAEC,SAAS,EAAE,GAAGhB,uBAClDC,QACAC;IAGF,IAAI,CAACG,OAAO;QACV,qBACE,KAACX;YAAYgB,QAAQA;YAAQC,MAAMA;YAAMM,cAAc;YAACC,cAAc;sBACpE,cAAA,KAACtB;gBAAWuB,SAAQ;gBAAQC,OAAM;0BAC/B;;;IAIT;IAEA,IAAI,CAACN,UAAU;QACb,qBACE,KAACpB;YAAYgB,QAAQA;YAAQC,MAAMA;YAAMM,cAAc;YAACC,cAAc;sBACpE,cAAA,KAACX;gBAAkBS,WAAWA;gBAAWD,aAAaA;0BACnDH;;;IAIT;IAEA,qBAAO;kBAAGC;;AACZ;AAEA,eAAeJ,qBAAoB"}
|
package/src/lib/native-nav.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/plugins/commerce/src/lib/native-nav.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type NativeNavContribution,\n type NativeNavCreateContribution,\n type NativeNavElsewhere,\n nativeNavHubSection,\n nativeNavIcon,\n nativeNavRef,\n} from '@aglyn/aglyn/app-utils/native-nav'\n\n/**\n * Orders and Products in the native apps' navigation (AGL-3943): the rows this plugin\n * adds to the manifest the shells draw, placed into the core's lists by\n * `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the\n * console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.\n *\n * Imports only the core's plain nav module, so the native contracts read it.\n */\n\nexport const NATIVE_NAV_ROWS: readonly NativeNavContribution[] = [\n {\n list: 'site',\n group: 'sell',\n row: {\n id: 'orders',\n label: 'Orders',\n icon: nativeNavIcon('bag', '
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/commerce/src/lib/native-nav.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type NativeNavContribution,\n type NativeNavCreateContribution,\n type NativeNavElsewhere,\n nativeNavHubSection,\n nativeNavIcon,\n nativeNavRef,\n} from '@aglyn/aglyn/app-utils/native-nav'\n\n/**\n * Orders and Products in the native apps' navigation (AGL-3943): the rows this plugin\n * adds to the manifest the shells draw, placed into the core's lists by\n * `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the\n * console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.\n *\n * Imports only the core's plain nav module, so the native contracts read it.\n */\n\nexport const NATIVE_NAV_ROWS: readonly NativeNavContribution[] = [\n {\n list: 'site',\n group: 'sell',\n row: {\n id: 'orders',\n label: 'Orders',\n icon: nativeNavIcon('bag', 'shopping_bag'),\n screen: 'commerce.orders',\n pluginId: 'commerce',\n order: 10,\n sections: [\n nativeNavHubSection('host', '/products', 'orders', 'Orders', 'commerce.orders'),\n nativeNavHubSection('host', '/products', 'returns', 'Returns', 'commerce.returns'),\n nativeNavHubSection('host', '/products', 'reservations', 'Reservations', 'commerce.reservations'),\n ],\n docs: '/commerce-and-bookings/commerce/overview',\n console: nativeNavRef('hostPluginSection', '/products/orders'),\n },\n },\n {\n list: 'site',\n group: 'sell',\n row: {\n id: 'products',\n label: 'Products',\n icon: nativeNavIcon('tag', 'sell'),\n screen: 'commerce.products',\n pluginId: 'commerce',\n order: 20,\n keywords: ['catalog', 'stock', 'inventory'],\n sections: [\n nativeNavHubSection('host', '/products', 'catalog', 'Catalog', 'commerce.products'),\n nativeNavHubSection('host', '/products', 'promotions', 'Promotions', 'commerce.promotions'),\n nativeNavHubSection('host', '/products', 'analytics', 'Analytics', 'commerce.sales'),\n ],\n actions: [\n {\n id: 'scan',\n label: 'Scan stock',\n icon: nativeNavIcon('barcode.viewfinder', 'qr_code_scanner'),\n screen: 'commerce.scan',\n },\n {\n id: 'newProduct',\n label: 'New product',\n icon: nativeNavIcon('plus', 'add'),\n screen: 'commerce.product',\n params: { new: '1' },\n },\n ],\n docs: '/commerce-and-bookings/commerce/overview',\n console: nativeNavRef('hostPluginTab', '/products'),\n },\n },\n]\n\n/** The console's POS tab is the register app's, not a row of this one. */\nexport const NATIVE_NAV_ELSEWHERE: readonly NativeNavElsewhere[] = [\n { console: nativeNavRef('hostPluginTab', '/pos'), where: 'The POS app' },\n]\n\n/** A product (\"Add product\" on Catalog) and a draft order (\"Draft order\" on Orders). */\nexport const NATIVE_NAV_CREATE: readonly NativeNavCreateContribution[] = [\n {\n scope: 'site',\n item: {\n id: 'product',\n label: 'Product',\n icon: nativeNavIcon('tag', 'sell'),\n screen: 'commerce.product',\n params: { new: '1' },\n pluginId: 'commerce',\n planFeature: 'commerce',\n order: 20,\n console: nativeNavRef('hostPluginSection', '/products/catalog'),\n },\n },\n {\n scope: 'site',\n item: {\n id: 'draftOrder',\n label: 'Draft order',\n icon: nativeNavIcon('link.badge.plus', 'link'),\n screen: 'commerce.orders',\n params: { new: '1' },\n pluginId: 'commerce',\n planFeature: 'commerce',\n order: 30,\n console: nativeNavRef('hostPluginSection', '/products/orders'),\n },\n },\n]\n"],"names":["nativeNavHubSection","nativeNavIcon","nativeNavRef","NATIVE_NAV_ROWS","list","group","row","id","label","icon","screen","pluginId","order","sections","docs","console","keywords","actions","params","new","NATIVE_NAV_ELSEWHERE","where","NATIVE_NAV_CREATE","scope","item","planFeature"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAIEA,mBAAmB,EACnBC,aAAa,EACbC,YAAY,QACP,oCAAmC;AAE1C;;;;;;;CAOC,GAED,OAAO,MAAMC,kBAAoD;IAC/D;QACEC,MAAM;QACNC,OAAO;QACPC,KAAK;YACHC,IAAI;YACJC,OAAO;YACPC,MAAMR,cAAc,OAAO;YAC3BS,QAAQ;YACRC,UAAU;YACVC,OAAO;YACPC,UAAU;gBACRb,oBAAoB,QAAQ,aAAa,UAAU,UAAU;gBAC7DA,oBAAoB,QAAQ,aAAa,WAAW,WAAW;gBAC/DA,oBAAoB,QAAQ,aAAa,gBAAgB,gBAAgB;aAC1E;YACDc,MAAM;YACNC,SAASb,aAAa,qBAAqB;QAC7C;IACF;IACA;QACEE,MAAM;QACNC,OAAO;QACPC,KAAK;YACHC,IAAI;YACJC,OAAO;YACPC,MAAMR,cAAc,OAAO;YAC3BS,QAAQ;YACRC,UAAU;YACVC,OAAO;YACPI,UAAU;gBAAC;gBAAW;gBAAS;aAAY;YAC3CH,UAAU;gBACRb,oBAAoB,QAAQ,aAAa,WAAW,WAAW;gBAC/DA,oBAAoB,QAAQ,aAAa,cAAc,cAAc;gBACrEA,oBAAoB,QAAQ,aAAa,aAAa,aAAa;aACpE;YACDiB,SAAS;gBACP;oBACEV,IAAI;oBACJC,OAAO;oBACPC,MAAMR,cAAc,sBAAsB;oBAC1CS,QAAQ;gBACV;gBACA;oBACEH,IAAI;oBACJC,OAAO;oBACPC,MAAMR,cAAc,QAAQ;oBAC5BS,QAAQ;oBACRQ,QAAQ;wBAAEC,KAAK;oBAAI;gBACrB;aACD;YACDL,MAAM;YACNC,SAASb,aAAa,iBAAiB;QACzC;IACF;CACD,CAAA;AAED,wEAAwE,GACxE,OAAO,MAAMkB,uBAAsD;IACjE;QAAEL,SAASb,aAAa,iBAAiB;QAASmB,OAAO;IAAc;CACxE,CAAA;AAED,sFAAsF,GACtF,OAAO,MAAMC,oBAA4D;IACvE;QACEC,OAAO;QACPC,MAAM;YACJjB,IAAI;YACJC,OAAO;YACPC,MAAMR,cAAc,OAAO;YAC3BS,QAAQ;YACRQ,QAAQ;gBAAEC,KAAK;YAAI;YACnBR,UAAU;YACVc,aAAa;YACbb,OAAO;YACPG,SAASb,aAAa,qBAAqB;QAC7C;IACF;IACA;QACEqB,OAAO;QACPC,MAAM;YACJjB,IAAI;YACJC,OAAO;YACPC,MAAMR,cAAc,mBAAmB;YACvCS,QAAQ;YACRQ,QAAQ;gBAAEC,KAAK;YAAI;YACnBR,UAAU;YACVc,aAAa;YACbb,OAAO;YACPG,SAASb,aAAa,qBAAqB;QAC7C;IACF;CACD,CAAA"}
|