Skip to content

Commit

Permalink
Remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmoltin committed Nov 14, 2024
1 parent 18bd863 commit a056e2b
Show file tree
Hide file tree
Showing 31 changed files with 1,670 additions and 12 deletions.
2 changes: 1 addition & 1 deletion changelog/2018/changelog-2018-12-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion changelog/2021/changelog-2021-01-05.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion changelog/2022/changelog-2022-05-03.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
4 changes: 2 additions & 2 deletions changelog/2022/changelog-2022-05-26.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion changelog/2023/2023-08-22-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)**.
2 changes: 1 addition & 1 deletion changelog/2024/2024-04-10-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)**.
1 change: 0 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion openapispecs/commerceextensions/OpenAPISpec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
138 changes: 138 additions & 0 deletions src/components/PropsTable/index.jsx
Original file line number Diff line number Diff line change
@@ -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 (
<pre className={styles.propType}>
<code>
<Link href="/web-core/reference/DyteParticipant">
DyteParticipant
</Link>{' '}
| <Link href="/web-core/reference/DyteSelf">DyteSelf</Link>
</code>
</pre>
);
}

if (prop.type === 'Peer[]') {
return (
<pre className={styles.propType}>
<code>
(
<Link href="/web-core/reference/DyteParticipant">
DyteParticipant
</Link>{' '}
| <Link href="/web-core/reference/DyteSelf">DyteSelf</Link>)[]
</code>
</pre>
);
}

const ref = REFERENCE_PROPS[prop.name] || WEB_CORE_TYPE_REFERENCES[prop.type];

if (ref) {
return (
<pre className={styles.propType}>
<code>
<Link href={ref.path}>{ref.name}</Link>
</code>
</pre>
);
}

return <CodeBlock language="ts">{prop.type}</CodeBlock>;
}

function PropCard({ prop }) {
return (
<div className={styles.card}>
<h4>
<code>{prop.name}</code>
</h4>
<div>
{prop.required && (
<p>
<code data-code="required">required</code>
</p>
)}
<p className={styles.docs}>{prop.docs}</p>
{prop.default && prop.default.length > 0 && (
<div>
<h5>Default</h5>
<CodeBlock language="ts">{prop.default}</CodeBlock>
</div>
)}
<div>
<h5>Type</h5>
<PropType prop={prop} />
</div>
</div>
</div>
);
}

export default function PropsTable({ of }) {
const doc = UIKitDocs.components.find((component) => component.tag === of);

if (!doc) return null;

const { props } = doc;

// brings required props to start
props.sort((a) => (a.required ? -1 : 1));

return (
<div className={styles.root}>
<div className={styles.props}>
{props.map((prop) => (
<PropCard prop={prop} key={prop.name} />
))}
</div>
</div>
);
}
51 changes: 51 additions & 0 deletions src/components/PropsTable/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.card h5 {
font-weight: 500;
}

.card h3 {
margin: 0;
}

.card h4 {
font-weight: 600;
padding: 12px 0;
margin: 12px 0;
border-bottom: 1px solid var(--docs-color-border);
}

.props {
display: flex;
flex-direction: column;
gap: 6px;

display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 20px;
}

.docs {
color: var(--docs-color-text-100);
font-size: 90%;
}

.propType {
background-color: var(--docs-color-code-background);
padding: var(--ifm-pre-padding);
border: 1px solid var(--code-border-color);
border-radius: var(--ifm-code-border-radius);
}

.default {
font-size: 90%;
}

.default > span {
margin-right: 4px;
}

@media screen and (max-width: 996px) {
.props {
grid-template-columns: repeat(1, minmax(0, 1fr));
gap: 0px;
}
}
58 changes: 58 additions & 0 deletions src/components/SectionsMenu/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React, { forwardRef } from 'react';
import * as Select from '@radix-ui/react-select';
import clsx from 'clsx';
import { Check, ChevronDown, ChevronUp } from 'react-feather';

const SectionsMenu = forwardRef(
({ defaultValue = '', values = [], children, className, ...props }, ref) => {
return (
<Select.Root defaultValue={defaultValue} ref={ref} {...props}>
<Select.Trigger
aria-title="Select Section"
className={clsx('sections-menu-trigger', className)}
>
<Select.Value />
<Select.Icon>
<ChevronDown className="sections-menu-scrollButton" />
</Select.Icon>
</Select.Trigger>

<Select.Content className={clsx('sections-menu-content', className)}>
<Select.ScrollUpButton className="sections-menu-scrollButton">
<ChevronUp />
</Select.ScrollUpButton>

<Select.Viewport>
<Select.Group>
{values.map(({ docId, name, icon: Icon, disabled = false }) => (
<Select.Item
value={docId}
key={docId}
className={clsx('sections-menu-item')}
disabled={disabled}
>
<Select.ItemText>
<div className="item-text">
{Icon && <Icon />}
<span>{name}</span>
</div>
</Select.ItemText>
<Select.ItemIndicator className="flex items-center">
<Check className="item-indicator" />
</Select.ItemIndicator>
</Select.Item>
))}
{children}
</Select.Group>
</Select.Viewport>

<Select.ScrollDownButton className="sections-menu-scrollButton">
<ChevronDown />
</Select.ScrollDownButton>
</Select.Content>
</Select.Root>
);
}
);

export default SectionsMenu;
Loading

0 comments on commit a056e2b

Please sign in to comment.