From a056e2b129dfa491cb869e057d04515a67b570bf Mon Sep 17 00:00:00 2001
From: David Stover <56250584+davidmoltin@users.noreply.github.com>
Date: Thu, 14 Nov 2024 15:35:58 -0500
Subject: [PATCH] Remove unused
---
changelog/2018/changelog-2018-12-04.md | 2 +-
changelog/2021/changelog-2021-01-05.md | 2 +-
changelog/2022/changelog-2022-05-03.md | 2 +-
changelog/2022/changelog-2022-05-26.md | 4 +-
changelog/2023/2023-08-22-changelog.md | 2 +-
changelog/2024/2024-04-10-changelog.md | 2 +-
docusaurus.config.js | 1 -
.../commerceextensions/OpenAPISpec.yaml | 2 +-
package.json | 7 +-
src/components/PropsTable/index.jsx | 138 +++++++++
src/components/PropsTable/styles.module.css | 51 ++++
src/components/SectionsMenu/index.jsx | 58 ++++
src/components/SidebarMenu/index.jsx | 110 +++++++
src/components/SidebarMenu/styles.module.css | 70 +++++
src/faq.js | 6 +
src/faq.yaml | 20 ++
src/pages/faq.jsx | 231 +++++++++++++++
src/sections.ts | 164 +++++++++++
src/theme/Admonition/index.js | 177 ++++++++++++
src/theme/Admonition/styles.module.css | 31 ++
src/theme/DocSidebar/Desktop/index.d.ts | 10 +
src/theme/DocSidebar/Desktop/index.jsx | 33 +++
.../DocSidebar/Desktop/styles.module.css | 43 +++
src/theme/DocSidebar/Mobile/index.d.ts | 5 +
src/theme/DocSidebar/Mobile/index.jsx | 42 +++
src/theme/MDXComponents.js | 2 +
src/theme/Playground/index.d.ts | 7 +
src/theme/Playground/index.jsx | 143 +++++++++
src/theme/Playground/styles.module.css | 33 +++
src/theme/ReactLiveScope/index.d.ts | 271 ++++++++++++++++++
src/theme/ReactLiveScope/index.js | 13 +
31 files changed, 1670 insertions(+), 12 deletions(-)
create mode 100644 src/components/PropsTable/index.jsx
create mode 100644 src/components/PropsTable/styles.module.css
create mode 100644 src/components/SectionsMenu/index.jsx
create mode 100644 src/components/SidebarMenu/index.jsx
create mode 100644 src/components/SidebarMenu/styles.module.css
create mode 100644 src/faq.js
create mode 100644 src/faq.yaml
create mode 100644 src/pages/faq.jsx
create mode 100644 src/sections.ts
create mode 100644 src/theme/Admonition/index.js
create mode 100644 src/theme/Admonition/styles.module.css
create mode 100644 src/theme/DocSidebar/Desktop/index.d.ts
create mode 100644 src/theme/DocSidebar/Desktop/index.jsx
create mode 100644 src/theme/DocSidebar/Desktop/styles.module.css
create mode 100644 src/theme/DocSidebar/Mobile/index.d.ts
create mode 100644 src/theme/DocSidebar/Mobile/index.jsx
create mode 100644 src/theme/Playground/index.d.ts
create mode 100644 src/theme/Playground/index.jsx
create mode 100644 src/theme/Playground/styles.module.css
create mode 100644 src/theme/ReactLiveScope/index.d.ts
create mode 100644 src/theme/ReactLiveScope/index.js
diff --git a/changelog/2018/changelog-2018-12-04.md b/changelog/2018/changelog-2018-12-04.md
index 1cf29a0b..1d3003dd 100644
--- a/changelog/2018/changelog-2018-12-04.md
+++ b/changelog/2018/changelog-2018-12-04.md
@@ -2,4 +2,4 @@
title: 'Changelog 2018-12-04'
date: '2018-12-04'
---
-- Updated search to return a 400 error explaining the search contains [unsupported characters](/guides/Getting-Started/filtering#supported-characters).
+- Updated search to return a 400 error explaining the search contains [unsupported characters](/docs/commerce-cloud/api-overview/filtering#supported-characters).
diff --git a/changelog/2021/changelog-2021-01-05.md b/changelog/2021/changelog-2021-01-05.md
index b1180dac..33857d3c 100644
--- a/changelog/2021/changelog-2021-01-05.md
+++ b/changelog/2021/changelog-2021-01-05.md
@@ -4,4 +4,4 @@ date: '2021-01-05'
tags:
- Commerce Manager
---
-**Minor** Moved the Swift SDK examples from the API Reference documentation to the community-supported `ios-sdk` repository [Readme file](https://github.com/moltin/ios-sdk/blob/master/README).
+**Minor** Moved the Swift SDK examples from the API Reference documentation to the community-supported `ios-sdk` repository [Readme file](https://github.com/moltin/ios-sdk/blob/master/README.md).
diff --git a/changelog/2022/changelog-2022-05-03.md b/changelog/2022/changelog-2022-05-03.md
index 87adb03e..6bee6064 100644
--- a/changelog/2022/changelog-2022-05-03.md
+++ b/changelog/2022/changelog-2022-05-03.md
@@ -7,7 +7,7 @@ tags:
- Commerce Manager
- Product Experience Manager
---
-**Major** Added PayPal Express Checkout payment method. For more information, see [PayPal Express Checkout](/docs/api/payments/update-paypal-express-checkout-gateway) and [PayPal Express Checkout Payments](/docs/api/payments/update-paypal-express-checkout-gateway). You can also use PayPal Express Checkout in Commerce Manager.
+**Major** Added PayPal Express Checkout payment method. For more information, see [PayPal Express Checkout](/docs/commerce-cloud/payments/payment-gateway/configure-paypal-express-checkout) and [PayPal Express Checkout Payments](/docs/api/payments/update-paypal-express-checkout-gateway). You can also use PayPal Express Checkout in Commerce Manager.
**Major** Commerce Manager: You can now localize your product names and descriptions. See [Configuring Locales](/docs/api/pxm/products/create-product).
diff --git a/changelog/2022/changelog-2022-05-26.md b/changelog/2022/changelog-2022-05-26.md
index b74e97fa..708bba95 100644
--- a/changelog/2022/changelog-2022-05-26.md
+++ b/changelog/2022/changelog-2022-05-26.md
@@ -21,6 +21,6 @@ tags:
**Minor** Commerce Manager: When viewing an order, you can now click a product name to view the product details. See [Orders](/docs/commerce-manager/orders/orders-cm).
-**Minor** Commerce Manager: New **Total Orders** and **Total Value of All Orders** fields and improved layout available in **Analytics**. See [Analytics](/docs/commerce-manager/analytics/).
+**Minor** Commerce Manager: New **Total Orders** and **Total Value of All Orders** fields and improved layout available in **Analytics**. See [Analytics](/docs/commerce-cloud/analytics/analytics).
-**Minor** Commerce Manager: The **Rename store** field is now moved to **Settings > Store Settings** page. For more information, see [Renaming a Store](/docs/commerce-manager/settings/general-settings).
+**Minor** Commerce Manager: The **Rename store** field is now moved to **Settings > Store Settings** page. For more information, see [Renaming a Store](/docs/commerce-cloud/global-project-settings/general-settings).
diff --git a/changelog/2023/2023-08-22-changelog.md b/changelog/2023/2023-08-22-changelog.md
index a14d6146..e2b5fa37 100644
--- a/changelog/2023/2023-08-22-changelog.md
+++ b/changelog/2023/2023-08-22-changelog.md
@@ -11,4 +11,4 @@ hide_blog_post_date: false
* Removed store type label previously displayed next to store names, and replaced with **STORE** label instead to help distinguish from when a user is managing an Organization.
* Added rate limit details for stores under **SYSTEM > Store Settings > General Settings**, which have been reorganized to group together related settings.
-For more information, see **[General Settings in Commerce Manager](/docs/commerce-manager/settings/general-settings)**.
+For more information, see **[General Settings in Commerce Manager](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/general-settings)**.
diff --git a/changelog/2024/2024-04-10-changelog.md b/changelog/2024/2024-04-10-changelog.md
index f141113f..b2d95f53 100644
--- a/changelog/2024/2024-04-10-changelog.md
+++ b/changelog/2024/2024-04-10-changelog.md
@@ -6,4 +6,4 @@ hide_blog_post_date: false
---
**MAJOR** We have introduced a new feature, called **Promotions Builder,** powered by our Rule Promotion engine. This feature offers you the flexibility in providing diverse discounts to shoppers, supporting discounts of varying complexities, ranging from code-based customer discounts to Buy X Get Y discounts, fixed price promotions, cart fixed discount, and many more based on your business needs. Moreover, it is compatible with our existing legacy promotions capability, ensuring a smooth transition to the new Promotions Builder. For more information, see **[Promotions Builder in Commerce Manager](https://elasticpath.dev/docs/commerce-cloud/rule-promotions/promotions-in-commerce-manager/overview)**. To create promotions using API, see **[Rule Promotions](https://elasticpath.dev/docs/commerce-cloud/rule-promotions/overview)**. To apply Rule Promotions API in carts and orders, you must enable the **use\_rule\_promotion** field in **[Cart Settings](https://elasticpath.dev/docs/commerce-cloud/carts/cart-management/cart-settings/update-cart-settings)**.
-**MINOR** The **[Get all Products](https://elasticpath.dev/docs/pxm/products/ep-pxm-products-api/get-all-products)** and **[Get all Promotions](https://elasticpath.dev/docs/commerce-cloud/promotions/promotion-management/get-all-promotions)** endpoints now support beta filtering. The new syntax is an evolution of the original syntax, and allows more characters and formats. For more information, see **[Beta Filtering](https://elasticpath.dev/guides/Getting-Started/filtering#beta-filtering)**.
+**MINOR** The **[Get all Products](https://elasticpath.dev/docs/pxm/products/ep-pxm-products-api/get-all-products)** and **[Get all Promotions](https://elasticpath.dev/docs/commerce-cloud/promotions/promotion-management/get-all-promotions)** endpoints now support beta filtering. The new syntax is an evolution of the original syntax, and allows more characters and formats. For more information, see **[Beta Filtering](https://elasticpath.dev/docs/commerce-cloud/api-overview/filtering#beta-filtering)**.
diff --git a/docusaurus.config.js b/docusaurus.config.js
index b25526cf..2ce30f40 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -1632,7 +1632,6 @@ const config = {
"@docusaurus/theme-mermaid",
[
require.resolve("@easyops-cn/docusaurus-search-local"),
- /** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
({
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
diff --git a/openapispecs/commerceextensions/OpenAPISpec.yaml b/openapispecs/commerceextensions/OpenAPISpec.yaml
index 3ef47f67..9e7f8a3b 100644
--- a/openapispecs/commerceextensions/OpenAPISpec.yaml
+++ b/openapispecs/commerceextensions/OpenAPISpec.yaml
@@ -1656,7 +1656,7 @@ components:
name: filter
in: query
required: false
- description: Filter attributes. For more information, see the [Filtering](/guides/Getting-Started/filtering) section.
+ description: Filter attributes. For more information, see the [Filtering](/docs/commerce-cloud/api-overview/filtering) section.
schema:
type: string
format: string
diff --git a/package.json b/package.json
index bd592e09..09349221 100644
--- a/package.json
+++ b/package.json
@@ -24,11 +24,12 @@
"@docusaurus/plugin-client-redirects": "^2.4.3",
"@docusaurus/plugin-content-docs": "^2.4.3",
"@docusaurus/plugin-google-gtag": "^2.4.3",
- "@docusaurus/plugin-google-tag-manager": "^3.5.2",
- "@docusaurus/plugin-ideal-image": "^3.3.2",
- "@docusaurus/plugin-pwa": "^3.5.2",
+ "@docusaurus/plugin-google-tag-manager": "^2.4.3",
+ "@docusaurus/plugin-ideal-image": "^2.4.3",
+ "@docusaurus/plugin-pwa": "^2.4.3",
"@docusaurus/preset-classic": "2.4.3",
"@docusaurus/remark-plugin-npm2yarn": "^2.4.3",
+ "@docusaurus/theme-live-codeblock": "^2.4.3",
"@docusaurus/theme-mermaid": "^2.4.3",
"@easyops-cn/docusaurus-search-local": "^0.36.0",
"@fluentui/react-icons": "^2.0.230",
diff --git a/src/components/PropsTable/index.jsx b/src/components/PropsTable/index.jsx
new file mode 100644
index 00000000..7137a456
--- /dev/null
+++ b/src/components/PropsTable/index.jsx
@@ -0,0 +1,138 @@
+import React from 'react';
+import CodeBlock from '@theme/CodeBlock';
+import styles from './styles.module.css';
+import Link from '@docusaurus/Link';
+
+const REFERENCE_PROPS = {
+ config: {
+ path: '../reference/interfaces/UIConfig',
+ name: 'UIConfig',
+ },
+ iconPack: {
+ path: '../reference/#iconpack',
+ name: 'IconPack',
+ },
+ // participant: {
+ // path: '../reference/participant',
+ // name: 'Participant',
+ // },
+ states: {
+ path: '../reference/interfaces/States',
+ name: 'States',
+ },
+ notification: {
+ path: '../reference/interfaces/Notification',
+ name: 'Notification',
+ },
+ // poll: {
+ // path: '../reference/poll',
+ // name: 'Poll',
+ // },
+ plugins: {
+ path: '/web-core/reference/DytePlugin',
+ name: 'DytePlugin[]',
+ },
+ plugin: {
+ path: '/web-core/reference/DytePlugin',
+ name: 'DytePlugin',
+ },
+};
+
+const WEB_CORE_TYPE_REFERENCES = {
+ DyteClient: {
+ path: '/web-core/reference/DyteClient',
+ name: 'DyteClient',
+ },
+};
+
+function PropType({ prop }) {
+ if (prop.name === 'participant') {
+ return (
+
+
+ {
+ // Mobile sidebar should only be closed if the category has a link
+ if (item.type === 'category' && item.href) {
+ mobileSidebar.toggle();
+ }
+ if (item.type === 'link') {
+ mobileSidebar.toggle();
+ }
+ }}
+ level={1}
+ />
+
+ );
+};
+function DocSidebarMobile(props) {
+ return (
+
+ );
+}
+export default React.memo(DocSidebarMobile);
diff --git a/src/theme/MDXComponents.js b/src/theme/MDXComponents.js
index d692c85d..cb866b07 100644
--- a/src/theme/MDXComponents.js
+++ b/src/theme/MDXComponents.js
@@ -8,6 +8,7 @@ import ColorCode from '../components/ColorCode';
import ColorPalette from '../components/ColorPalette';
import VideoPlayer from '../components/VideoPlayer';
import InfoTooltip from '../components/InfoTooltip';
+import PropsTable from '../components/PropsTable';
import ComponentsGrid from '../components/ComponentsGrid';
import { CardSection, Card } from '../components/CardComponents';
import * as icons from '../icons';
@@ -24,6 +25,7 @@ export default {
ColorPalette,
VideoPlayer,
InfoTooltip,
+ PropsTable,
ComponentsGrid,
CardSection,
Card,
diff --git a/src/theme/Playground/index.d.ts b/src/theme/Playground/index.d.ts
new file mode 100644
index 00000000..0b0eb681
--- /dev/null
+++ b/src/theme/Playground/index.d.ts
@@ -0,0 +1,7 @@
+///
+import type { Props } from '@theme/Playground';
+export default function Playground({
+ children,
+ transformCode,
+ ...props
+}: Props): JSX.Element;
diff --git a/src/theme/Playground/index.jsx b/src/theme/Playground/index.jsx
new file mode 100644
index 00000000..1c05a1d5
--- /dev/null
+++ b/src/theme/Playground/index.jsx
@@ -0,0 +1,143 @@
+import React, { useEffect } from 'react';
+import clsx from 'clsx';
+import useIsBrowser from '@docusaurus/useIsBrowser';
+import { LiveProvider, LiveEditor, LiveError, LivePreview } from 'react-live';
+import Translate from '@docusaurus/Translate';
+import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
+import BrowserOnly from '@docusaurus/BrowserOnly';
+import { usePrismTheme } from '@docusaurus/theme-common';
+import styles from './styles.module.css';
+
+function Header({ children }) {
+ return
{children}
;
+}
+
+function LivePreviewLoader() {
+ // Is it worth improving/translating?
+ return