From abe7b66999b25c09c6bdc6bff3a532859171b346 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 6 Sep 2024 11:33:34 +0300 Subject: [PATCH] docs: rename admin-shared -> admin-sdk (#9008) --- www/apps/book/app/advanced-development/admin/tips/page.mdx | 4 ++-- .../book/app/advanced-development/admin/ui-routes/page.mdx | 6 +++--- .../book/app/advanced-development/admin/widgets/page.mdx | 6 +++--- www/apps/book/app/basics/admin-customizations/page.mdx | 2 +- .../app/recipes/digital-products/examples/standard/page.mdx | 2 +- .../app/recipes/subscriptions/examples/standard/page.mdx | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/www/apps/book/app/advanced-development/admin/tips/page.mdx b/www/apps/book/app/advanced-development/admin/tips/page.mdx index 3b1ef9f717a82..9ece173e705fb 100644 --- a/www/apps/book/app/advanced-development/admin/tips/page.mdx +++ b/www/apps/book/app/advanced-development/admin/tips/page.mdx @@ -17,7 +17,7 @@ export const fetchHighlights = [ ] ```tsx title="src/admin/widgets/product-widget.tsx" highlights={fetchHighlights} -import { defineWidgetConfig } from "@medusajs/admin-shared" +import { defineWidgetConfig } from "@medusajs/admin-sdk" import { Container } from "@medusajs/ui" import { useEffect, useState } from "react" @@ -71,7 +71,7 @@ export const highlights = [ ] ```tsx title="src/admin/widgets/product-widget.tsx" highlights={highlights} -import { defineWidgetConfig } from "@medusajs/admin-shared" +import { defineWidgetConfig } from "@medusajs/admin-sdk" import { Container } from "@medusajs/ui" import { Link } from "react-router-dom" diff --git a/www/apps/book/app/advanced-development/admin/ui-routes/page.mdx b/www/apps/book/app/advanced-development/admin/ui-routes/page.mdx index 908b32d466d92..d65830a203b94 100644 --- a/www/apps/book/app/advanced-development/admin/ui-routes/page.mdx +++ b/www/apps/book/app/advanced-development/admin/ui-routes/page.mdx @@ -64,7 +64,7 @@ export const highlights = [ ] ```tsx title="src/admin/routes/custom/page.tsx" highlights={[["21"], ["22"], ["23"], ["24"], ["25"], ["26"]]} -import { defineRouteConfig } from "@medusajs/admin-shared" +import { defineRouteConfig } from "@medusajs/admin-sdk" import { ChatBubbleLeftRight } from "@medusajs/icons" import { Container } from "@medusajs/ui" @@ -80,7 +80,7 @@ export const config = defineRouteConfig({ export default CustomPage ``` -The configuration object is created using the `defineRouteConfig` function imported from `@medusajs/admin-shared`. It accepts the following properties: +The configuration object is created using the `defineRouteConfig` function imported from `@medusajs/admin-sdk`. It accepts the following properties: - `label`: the sidebar item’s label. - `icon`: an optional React component used as an icon in the sidebar. @@ -96,7 +96,7 @@ To create a page under the settings section of the admin dashboard, create the U For example: ```tsx title="src/admin/routes/settings/custom/page.tsx" -import { defineRouteConfig } from "@medusajs/admin-shared" +import { defineRouteConfig } from "@medusajs/admin-sdk" import { Container, Heading } from "@medusajs/ui" const CustomSettingPage = () => { diff --git a/www/apps/book/app/advanced-development/admin/widgets/page.mdx b/www/apps/book/app/advanced-development/admin/widgets/page.mdx index 65c292866aae5..47f0a385b07c9 100644 --- a/www/apps/book/app/advanced-development/admin/widgets/page.mdx +++ b/www/apps/book/app/advanced-development/admin/widgets/page.mdx @@ -28,7 +28,7 @@ export const widgetHighlights = [ ] ```tsx title="src/admin/widgets/product-widget.tsx" highlights={widgetHighlights} -import { defineWidgetConfig } from "@medusajs/admin-shared" +import { defineWidgetConfig } from "@medusajs/admin-sdk" import { Container, Heading } from "@medusajs/ui" // The widget @@ -50,7 +50,7 @@ export default ProductWidget The widget only shows the heading `Product Widget`. -Use the `defineWidgetConfig` function imported from `@medusajs/admin-shared` to create and export the widget's configurations. It accepts as a parameter an object with the following property: +Use the `defineWidgetConfig` function imported from `@medusajs/admin-sdk` to create and export the widget's configurations. It accepts as a parameter an object with the following property: - `zone`: A string or an array of strings, each being the name of the zone to inject the widget into. @@ -89,7 +89,7 @@ export const detailHighlights = [ ] ```tsx title="src/admin/widgets/product-widget.tsx" highlights={detailHighlights} -import { defineWidgetConfig } from "@medusajs/admin-shared" +import { defineWidgetConfig } from "@medusajs/admin-sdk" import { Container, Heading } from "@medusajs/ui" import { DetailWidgetProps, diff --git a/www/apps/book/app/basics/admin-customizations/page.mdx b/www/apps/book/app/basics/admin-customizations/page.mdx index 3a2695a03d805..b1be598aaff69 100644 --- a/www/apps/book/app/basics/admin-customizations/page.mdx +++ b/www/apps/book/app/basics/admin-customizations/page.mdx @@ -23,7 +23,7 @@ A widget is a React component that can be injected into an existing page in the For example, create the file `src/admin/widgets/product-widget.tsx` with the following content: ```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-shared" +import { defineWidgetConfig } from "@medusajs/admin-sdk" const ProductWidget = () => { return ( diff --git a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx index 766060ab2f162..0e69d7204f2e9 100644 --- a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx @@ -849,7 +849,7 @@ export const digitalProductPageHighlights = [ ] ```tsx title="src/admin/routes/digital-products/page.tsx" highlights={digitalProductPageHighlights} collapsibleLines="1-7" expandMoreLabel="Show Imports" -import { defineRouteConfig } from "@medusajs/admin-shared" +import { defineRouteConfig } from "@medusajs/admin-sdk" import { PhotoSolid } from "@medusajs/icons" import { Container, Heading, Table } from "@medusajs/ui" import { useState } from "react" diff --git a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx index 33f12cff4404a..54fc86a73bb52 100644 --- a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx @@ -1139,7 +1139,7 @@ export const list1Highlights = [ ] ```tsx title="src/admin/routes/subscriptions/page.tsx" highlights={list1Highlights} collapsibleLines="1-7" expandMoreLabel="Show Imports" -import { defineRouteConfig } from "@medusajs/admin-shared" +import { defineRouteConfig } from "@medusajs/admin-sdk" import { ClockSolid } from "@medusajs/icons" import { Container, Heading, Table, Badge } from "@medusajs/ui" import { useState } from "react"