@vendure/admin-ui 2.1.4 → 2.1.6
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/core/common/version.d.ts +1 -1
- package/core/components/app-shell/app-shell.component.d.ts +1 -0
- package/core/extension/register-route-component.d.ts +1 -1
- package/core/shared/components/order-state-label/order-state-label.component.d.ts +1 -1
- package/core/shared/dynamic-form-inputs/default-form-inputs.d.ts +1 -1
- package/esm2022/catalog/components/collection-detail/collection-detail.component.mjs +2 -2
- package/esm2022/catalog/components/product-detail/product-detail.component.mjs +2 -2
- package/esm2022/core/common/utilities/configurable-operation-utils.mjs +1 -1
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/components/app-shell/app-shell.component.mjs +4 -3
- package/esm2022/core/shared/components/asset-preview/asset-preview.component.mjs +3 -3
- package/esm2022/core/shared/components/chart/chart.component.mjs +1 -1
- package/esm2022/core/shared/components/configurable-input/configurable-input.component.mjs +1 -1
- package/esm2022/core/shared/components/datetime-picker/datetime-picker.service.mjs +1 -1
- package/esm2022/core/shared/components/page-header-tabs/page-header-tabs.component.mjs +2 -2
- package/esm2022/login/components/login/login.component.mjs +4 -5
- package/esm2022/marketing/components/promotion-detail/promotion-detail.component.mjs +8 -8
- package/esm2022/order/components/order-payment-card/order-payment-card.component.mjs +2 -2
- package/esm2022/order/components/refund-order-dialog/refund-order-dialog.component.mjs +2 -2
- package/esm2022/react/react-hooks/use-form-control.mjs +1 -1
- package/esm2022/settings/components/payment-method-detail/payment-method-detail.component.mjs +8 -8
- package/esm2022/settings/settings.routes.mjs +4 -4
- package/fesm2022/vendure-admin-ui-catalog.mjs +3 -3
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +8 -7
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-login.mjs +2 -3
- package/fesm2022/vendure-admin-ui-login.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-marketing.mjs +7 -7
- package/fesm2022/vendure-admin-ui-marketing.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs +3 -3
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-react.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-settings.mjs +10 -10
- package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
- package/login/components/login/login.component.d.ts +0 -1
- package/package.json +8 -8
- package/settings/components/stock-location-list/stock-location-list.component.d.ts +1 -1
- package/static/i18n-messages/en.json +3 -3
- package/static/i18n-messages/pt_BR.json +1 -1
- package/static/styles/global/_sass-overrides.scss +5 -0
- package/static/styles/theme/dark.scss +5 -4
- package/static/styles/theme/default.scss +7 -2
- package/static/theme.min.css +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendure-admin-ui-react.mjs","sources":["../../src/lib/react/src/directives/react-component-host.directive.ts","../../src/lib/react/src/components/react-custom-column.component.ts","../../src/lib/react/src/components/react-custom-detail.component.ts","../../src/lib/react/src/components/react-form-input.component.ts","../../src/lib/react/src/components/react-route.component.ts","../../src/lib/react/src/react-components/ActionBar.tsx","../../src/lib/react/src/react-components/Card.tsx","../../src/lib/react/src/react-components/CdsIcon.tsx","../../src/lib/react/src/react-components/FormField.tsx","../../src/lib/react/src/react-hooks/use-injector.ts","../../src/lib/react/src/react-components/Link.tsx","../../src/lib/react/src/react-components/PageBlock.tsx","../../src/lib/react/src/react-components/PageDetailLayout.tsx","../../src/lib/react/src/react-hooks/use-detail-component-data.ts","../../src/lib/react/src/react-hooks/use-form-control.ts","../../src/lib/react/src/react-hooks/use-page-metadata.ts","../../src/lib/react/src/react-hooks/use-query.ts","../../src/lib/react/src/react-hooks/use-route-params.ts","../../src/lib/react/src/register-react-custom-detail-component.ts","../../src/lib/react/src/register-react-data-table-component.ts","../../src/lib/react/src/register-react-form-input-component.ts","../../src/lib/react/src/register-react-route-component.ts","../../src/lib/react/src/public_api.ts","../../src/lib/react/src/vendure-admin-ui-react.ts"],"sourcesContent":["import { Directive, ElementRef, Injector, Input, Optional } from '@angular/core';\r\nimport { PageMetadataService } from '@vendure/admin-ui/core';\r\nimport { ComponentProps, createContext, createElement, ElementType } from 'react';\r\nimport { createRoot, Root } from 'react-dom/client';\r\nimport { HostedReactComponentContext } from '../types';\r\n\r\nexport const HostedComponentContext = createContext<HostedReactComponentContext | null>(null);\r\n\r\n/**\r\n * Based on https://netbasal.com/using-react-in-angular-applications-1bb907ecac91\r\n */\r\n@Directive({\r\n selector: '[vdrReactComponentHost]',\r\n standalone: true,\r\n})\r\nexport class ReactComponentHostDirective<Comp extends ElementType> {\r\n @Input('vdrReactComponentHost') reactComponent: Comp;\r\n @Input() props: ComponentProps<Comp>;\r\n @Input() context: Record<string, any> = {};\r\n\r\n private root: Root | null = null;\r\n\r\n constructor(\r\n private host: ElementRef,\r\n private injector: Injector,\r\n @Optional() private pageMetadataService?: PageMetadataService,\r\n ) {}\r\n\r\n async ngOnChanges() {\r\n const Comp = this.reactComponent;\r\n\r\n if (!this.root) {\r\n this.root = createRoot(this.host.nativeElement);\r\n }\r\n\r\n this.root.render(\r\n createElement(\r\n HostedComponentContext.Provider,\r\n {\r\n value: {\r\n ...this.props,\r\n ...this.context,\r\n injector: this.injector,\r\n pageMetadataService: this.pageMetadataService,\r\n },\r\n },\r\n createElement(Comp, this.props),\r\n ),\r\n );\r\n }\r\n\r\n ngOnDestroy() {\r\n this.root?.unmount();\r\n }\r\n}\r\n","import { Component, inject, InjectionToken, Input, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { CustomColumnComponent } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport { ReactComponentHostDirective } from '../directives/react-component-host.directive';\r\n\r\nexport const REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS = new InjectionToken<{\r\n component: ElementType;\r\n props?: Record<string, any>;\r\n}>('REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS');\r\n\r\n@Component({\r\n selector: 'vdr-react-custom-column-component',\r\n template: ` <div [vdrReactComponentHost]=\"reactComponent\" [props]=\"props\"></div> `,\r\n styleUrls: ['./react-global-styles.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n imports: [ReactComponentHostDirective],\r\n})\r\nexport class ReactCustomColumnComponent implements CustomColumnComponent, OnInit {\r\n @Input() rowItem: any;\r\n\r\n protected reactComponent = inject(REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS).component;\r\n private options = inject(REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS);\r\n protected props: Record<string, any>;\r\n\r\n ngOnInit() {\r\n this.props = {\r\n rowItem: this.rowItem,\r\n ...(this.options.props ?? {}),\r\n };\r\n }\r\n}\r\n","import { Component, inject, InjectionToken, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { FormGroup, UntypedFormGroup } from '@angular/forms';\r\nimport { CustomDetailComponent } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport { Observable } from 'rxjs';\r\nimport { ReactComponentHostDirective } from '../directives/react-component-host.directive';\r\n\r\nexport const REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS = new InjectionToken<{\r\n component: ElementType;\r\n props?: Record<string, any>;\r\n}>('REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS');\r\n\r\nexport interface ReactCustomDetailComponentContext {\r\n detailForm: FormGroup;\r\n entity$: Observable<any>;\r\n}\r\n\r\n@Component({\r\n selector: 'vdr-react-custom-detail-component',\r\n template: ` <div [vdrReactComponentHost]=\"reactComponent\" [context]=\"context\" [props]=\"props\"></div> `,\r\n styleUrls: ['./react-global-styles.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n imports: [ReactComponentHostDirective],\r\n})\r\nexport class ReactCustomDetailComponent implements CustomDetailComponent, OnInit {\r\n detailForm: UntypedFormGroup;\r\n entity$: Observable<any>;\r\n protected props = inject(REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS).props ?? {};\r\n protected reactComponent = inject(REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS).component;\r\n protected context: ReactCustomDetailComponentContext;\r\n\r\n ngOnInit() {\r\n this.context = {\r\n detailForm: this.detailForm,\r\n entity$: this.entity$,\r\n };\r\n }\r\n}\r\n","import { Component, inject, InjectionToken, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { FormControl } from '@angular/forms';\r\nimport { CustomField, FormInputComponent } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport { ReactComponentHostDirective } from '../directives/react-component-host.directive';\r\nimport { ReactFormInputOptions } from '../types';\r\n\r\nexport const REACT_INPUT_COMPONENT_OPTIONS = new InjectionToken<{\r\n component: ElementType;\r\n}>('REACT_INPUT_COMPONENT_OPTIONS');\r\n\r\n@Component({\r\n selector: 'vdr-react-form-input-component',\r\n template: ` <div [vdrReactComponentHost]=\"reactComponent\" [context]=\"context\" [props]=\"context\"></div> `,\r\n styleUrls: ['./react-global-styles.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n imports: [ReactComponentHostDirective],\r\n})\r\nexport class ReactFormInputComponent implements FormInputComponent, OnInit {\r\n static readonly id: string = 'react-form-input-component';\r\n readonly: boolean;\r\n formControl: FormControl;\r\n config: CustomField & Record<string, any>;\r\n\r\n protected context: ReactFormInputOptions;\r\n\r\n protected reactComponent = inject(REACT_INPUT_COMPONENT_OPTIONS).component;\r\n\r\n ngOnInit() {\r\n this.context = {\r\n formControl: this.formControl,\r\n readonly: this.readonly,\r\n config: this.config,\r\n };\r\n }\r\n}\r\n","import { Component, inject, InjectionToken, ViewEncapsulation } from '@angular/core';\r\nimport { ROUTE_COMPONENT_OPTIONS, RouteComponent, SharedModule } from '@vendure/admin-ui/core';\r\nimport { ReactComponentHostDirective } from '../directives/react-component-host.directive';\r\nimport { ReactRouteComponentOptions } from '../types';\r\n\r\nexport const REACT_ROUTE_COMPONENT_OPTIONS = new InjectionToken<ReactRouteComponentOptions>(\r\n 'REACT_ROUTE_COMPONENT_OPTIONS',\r\n);\r\n\r\n@Component({\r\n selector: 'vdr-react-route-component',\r\n template: `\r\n <vdr-route-component\r\n ><div [vdrReactComponentHost]=\"reactComponent\" [props]=\"props\"></div\r\n ></vdr-route-component>\r\n `,\r\n styleUrls: ['./react-global-styles.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n imports: [ReactComponentHostDirective, RouteComponent, SharedModule],\r\n})\r\nexport class ReactRouteComponent {\r\n protected props = inject(REACT_ROUTE_COMPONENT_OPTIONS).props;\r\n protected reactComponent = inject(ROUTE_COMPONENT_OPTIONS).component;\r\n}\r\n","import React, { PropsWithChildren, ReactNode } from 'react';\r\n\r\n/**\r\n * @description\r\n * A container for the primary actions on a list or detail page\r\n *\r\n * @example\r\n * ```ts\r\n * import { ActionBar } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyComponent() {\r\n * return (\r\n * <ActionBar leftContent={<div>Optional left content</div>}>\r\n * <button className='button primary'>Primary action</button>\r\n * </ActionBar>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function ActionBar(props: PropsWithChildren<{ leftContent?: ReactNode }>) {\r\n return (\r\n <div className={'vdr-action-bar'}>\r\n <div className=\"left-content\">{props.leftContent}</div>\r\n <div className=\"right-content\">{props.children}</div>\r\n </div>\r\n );\r\n}\r\n","import React, { PropsWithChildren } from 'react';\r\n\r\n/**\r\n * @description\r\n * A card component which can be used to group related content.\r\n *\r\n * @example\r\n * ```ts\r\n * import { Card } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyComponent() {\r\n * return (\r\n * <Card title='My Title'>\r\n * <p>Some content</p>\r\n * </Card>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function Card(props: PropsWithChildren<{ title?: string; paddingX?: boolean }>) {\r\n return (\r\n <div className={'vdr-card'}>\r\n <div className={`card-container ${props.paddingX !== false ? 'padding-x' : ''}`}>\r\n {props.title && (\r\n <div className={'title-row'}>\r\n <div className=\"title\">{props.title}</div>\r\n </div>\r\n )}\r\n <div className=\"contents\">{props.children}</div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import { ClarityIcons } from '@cds/core/icon';\r\nimport { IconShapeTuple } from '@cds/core/icon/interfaces/icon.interfaces';\r\nimport React, { DOMAttributes, useEffect } from 'react';\r\n\r\ntype CustomElement<T> = Partial<T & DOMAttributes<T> & { children: any }>;\r\n\r\nexport interface CdsIconProps {\r\n shape: string;\r\n size: string | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';\r\n direction: 'up' | 'down' | 'left' | 'right';\r\n flip: 'horizontal' | 'vertical';\r\n solid: boolean;\r\n status: 'info' | 'success' | 'warning' | 'danger';\r\n inverse: boolean;\r\n badge: 'info' | 'success' | 'warning' | 'danger';\r\n}\r\n\r\ndeclare global {\r\n namespace JSX {\r\n interface IntrinsicElements {\r\n ['cds-icon']: CustomElement<CdsIconProps>;\r\n }\r\n }\r\n}\r\n\r\nexport function registerCdsIcon(icon: IconShapeTuple) {\r\n ClarityIcons.addIcons(icon);\r\n}\r\n\r\n/**\r\n * @description\r\n * A React wrapper for the Clarity UI icon component.\r\n *\r\n * @example\r\n * ```ts\r\n * import { userIcon } from '@cds/core/icon';\r\n * import { CdsIcon } from '@vendure/admin-ui/react';\r\n *\r\n * registerCdsIcon(userIcon);\r\n * export function MyComponent() {\r\n * return <CdsIcon icon={userIcon} badge=\"warning\" solid size=\"lg\"></CdsIcon>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function CdsIcon(props: { icon: IconShapeTuple; className?: string } & Partial<CdsIconProps>) {\r\n const { icon, ...rest } = props;\r\n useEffect(() => {\r\n ClarityIcons.addIcons(icon);\r\n }, [icon]);\r\n return <cds-icon {...rest} shape={icon[0]}></cds-icon>;\r\n}\r\n","import React, { PropsWithChildren } from 'react';\r\n\r\n/**\r\n * @description\r\n * A wrapper around form fields which provides a label, tooltip and error message.\r\n *\r\n * @example\r\n * ```ts\r\n * import { FormField } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyReactComponent() {\r\n * return (\r\n * <FormField label=\"My field\" tooltip=\"This is a tooltip\" invalid errorMessage=\"This field is invalid\">\r\n * <input type=\"text\" />\r\n * </FormField>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function FormField(\r\n props: PropsWithChildren<{\r\n for?: string;\r\n label?: string;\r\n tooltip?: string;\r\n invalid?: boolean;\r\n errorMessage?: string;\r\n }>,\r\n) {\r\n return (\r\n <div\r\n className={`form-group ` + (!props.label ? 'no-label' : '') + (props.invalid ? 'clr-error' : '')}\r\n >\r\n {props.label && <label htmlFor={props.for ?? ''}>{props.label}</label>}\r\n {props.tooltip && <div className=\"tooltip-text\">{props.tooltip}</div>}\r\n <div className={`input-row ` + (props.invalid ? 'invalid' : '')}>{props.children}</div>\r\n {props.errorMessage && <div className=\"error-message\">{props.errorMessage}</div>}\r\n </div>\r\n );\r\n}\r\n","import { ProviderToken } from '@angular/core';\r\nimport { useContext } from 'react';\r\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\r\n\r\n/**\r\n * @description\r\n * Exposes the Angular injector which allows the injection of services into React components.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useInjector } from '\\@vendure/admin-ui/react';\r\n * import { NotificationService } from '\\@vendure/admin-ui/core';\r\n *\r\n * export const MyComponent = () => {\r\n * const notificationService = useInjector(NotificationService);\r\n *\r\n * const handleClick = () => {\r\n * notificationService.success('Hello world!');\r\n * };\r\n * // ...\r\n * return <div>...</div>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useInjector<T = any>(token: ProviderToken<T>): T {\r\n const context = useContext(HostedComponentContext);\r\n const instance = context?.injector.get(token);\r\n if (!instance) {\r\n throw new Error(`Could not inject ${(token as any).name ?? token.toString()}`);\r\n }\r\n return instance;\r\n}\r\n","import { Router } from '@angular/router';\r\nimport React, { PropsWithChildren } from 'react';\r\nimport { useInjector } from '../react-hooks/use-injector';\r\n\r\n/**\r\n * @description\r\n * A React component which renders an anchor tag and navigates to the specified route when clicked.\r\n * This is useful when you want to use a React component in a Vendure UI plugin which navigates to\r\n * a route in the admin-ui.\r\n *\r\n * @example\r\n * ```ts\r\n * import { Link } from '@vendure/admin-ui/react';\r\n *\r\n * export const MyReactComponent = () => {\r\n * return <Link href=\"/extensions/my-extension\">Go to my extension</Link>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function Link(props: PropsWithChildren<{ href: string; [props: string]: any }>) {\r\n const router = useInjector(Router);\r\n const { href, ...rest } = props;\r\n\r\n function onClick(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {\r\n e.preventDefault();\r\n void router.navigateByUrl(href);\r\n }\r\n\r\n return (\r\n <a href={href} onClick={onClick} {...rest}>\r\n {props.children}\r\n </a>\r\n );\r\n}\r\n","import React, { PropsWithChildren } from 'react';\r\n\r\n/**\r\n * @description\r\n * A container for page content which provides a consistent width and spacing.\r\n *\r\n * @example\r\n * ```ts\r\n * import { PageBlock } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyComponent() {\r\n * return (\r\n * <PageBlock>\r\n * ...\r\n * </PageBlock>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function PageBlock(props: PropsWithChildren) {\r\n return <div className=\"page-block\">{props.children}</div>;\r\n}\r\n","import React, { PropsWithChildren, ReactNode } from 'react';\r\n\r\n/**\r\n * @description\r\n * A responsive container for detail views with a main content area and an optional sidebar.\r\n *\r\n * @example\r\n * ```ts\r\n * import { PageDetailLayout } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyComponent() {\r\n * return (\r\n * <PageDetailLayout sidebar={<div>Sidebar content</div>}>\r\n * <div>Main content</div>\r\n * </PageDetailLayout>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function PageDetailLayout(props: PropsWithChildren<{ sidebar?: ReactNode }>) {\r\n return (\r\n <div className={'vdr-page-detail-layout'}>\r\n <div className=\"main\">{props.children}</div>\r\n <div className=\"sidebar\">{props.sidebar}</div>\r\n </div>\r\n );\r\n}\r\n","import { useContext, useEffect, useState } from 'react';\r\nimport { ReactCustomDetailComponentContext } from '../components/react-custom-detail.component';\r\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\r\nimport { HostedReactComponentContext } from '../types';\r\n\r\n/**\r\n * @description\r\n * Provides the data available to React-based CustomDetailComponents.\r\n *\r\n * @example\r\n * ```ts\r\n * import { Card, useDetailComponentData } from '\\@vendure/admin-ui/react';\r\n * import React from 'react';\r\n *\r\n * export function CustomDetailComponent(props: any) {\r\n * const { entity, detailForm } = useDetailComponentData();\r\n * const updateName = () => {\r\n * detailForm.get('name')?.setValue('New name');\r\n * detailForm.markAsDirty();\r\n * };\r\n * return (\r\n * <Card title={'Custom Detail Component'}>\r\n * <button className=\"button\" onClick={updateName}>\r\n * Update name\r\n * </button>\r\n * <pre>{JSON.stringify(entity, null, 2)}</pre>\r\n * </Card>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useDetailComponentData<T = any>() {\r\n const context = useContext(\r\n HostedComponentContext,\r\n ) as HostedReactComponentContext<ReactCustomDetailComponentContext>;\r\n\r\n if (!context.detailForm || !context.entity$) {\r\n throw new Error(`The useDetailComponentData hook can only be used within a CustomDetailComponent`);\r\n }\r\n\r\n const [entity, setEntity] = useState<T | null>(null);\r\n\r\n useEffect(() => {\r\n const subscription = context.entity$.subscribe(value => {\r\n setEntity(value);\r\n });\r\n return () => subscription.unsubscribe();\r\n }, []);\r\n\r\n return {\r\n entity,\r\n detailForm: context.detailForm,\r\n };\r\n}\r\n","import { CustomFieldType } from '@vendure/common/lib/shared-types';\r\nimport { useContext, useEffect, useState } from 'react';\r\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\r\nimport { HostedReactComponentContext, ReactFormInputOptions } from '../types';\r\n\r\n/**\r\n * @description\r\n * Provides access to the current FormControl value and a method to update the value.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useFormControl, ReactFormInputProps } from '\\@vendure/admin-ui/react';\r\n * import React from 'react';\r\n *\r\n * export function ReactNumberInput({ readonly }: ReactFormInputProps) {\r\n * const { value, setFormValue } = useFormControl();\r\n *\r\n * const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n * setFormValue(val);\r\n * };\r\n * return (\r\n * <div>\r\n * <input readOnly={readonly} type=\"number\" onChange={handleChange} value={value} />\r\n * </div>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useFormControl() {\r\n const context = useContext(HostedComponentContext);\r\n if (!context) {\r\n throw new Error('No HostedComponentContext found');\r\n }\r\n if (!isFormInputContext(context)) {\r\n throw new Error('useFormControl() can only be used in a form input component');\r\n }\r\n const { formControl, config } = context;\r\n const [value, setValue] = useState(formControl.value ?? 0);\r\n\r\n useEffect(() => {\r\n const subscription = formControl.valueChanges.subscribe(v => {\r\n setValue(v);\r\n });\r\n return () => {\r\n subscription.unsubscribe();\r\n };\r\n }, []);\r\n\r\n function setFormValue(newValue: any) {\r\n formControl.setValue(coerceFormValue(newValue, config.type as CustomFieldType));\r\n formControl.markAsDirty();\r\n }\r\n\r\n return { value, setFormValue };\r\n}\r\n\r\nfunction isFormInputContext(\r\n context: HostedReactComponentContext,\r\n): context is HostedReactComponentContext<ReactFormInputOptions> {\r\n return context.config && context.formControl;\r\n}\r\n\r\nfunction coerceFormValue(value: any, type: CustomFieldType) {\r\n switch (type) {\r\n case 'int':\r\n case 'float':\r\n return Number(value);\r\n case 'boolean':\r\n return Boolean(value);\r\n default:\r\n return value;\r\n }\r\n}\r\n","import { BreadcrumbValue } from '@vendure/admin-ui/core';\r\nimport { useContext } from 'react';\r\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\r\nimport { HostedReactComponentContext, ReactRouteComponentOptions } from '../types';\r\n\r\n/**\r\n * @description\r\n * Provides functions for setting the current page title and breadcrumb.\r\n *\r\n * @example\r\n * ```ts\r\n * import { usePageMetadata } from '\\@vendure/admin-ui/react';\r\n * import { useEffect } from 'react';\r\n *\r\n * export const MyComponent = () => {\r\n * const { setTitle, setBreadcrumb } = usePageMetadata();\r\n * useEffect(() => {\r\n * setTitle('My Page');\r\n * setBreadcrumb([\r\n * { link: ['./parent'], label: 'Parent Page' },\r\n * { link: ['./'], label: 'This Page' },\r\n * ]);\r\n * }, []);\r\n * // ...\r\n * return <div>...</div>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function usePageMetadata() {\r\n const context = useContext(\r\n HostedComponentContext,\r\n ) as HostedReactComponentContext<ReactRouteComponentOptions>;\r\n const setBreadcrumb = (newValue: BreadcrumbValue) => {\r\n context.pageMetadataService?.setBreadcrumbs(newValue);\r\n };\r\n const setTitle = (newTitle: string) => {\r\n context.pageMetadataService?.setTitle(newTitle);\r\n };\r\n\r\n return {\r\n setBreadcrumb,\r\n setTitle,\r\n };\r\n}\r\n","import { TypedDocumentNode } from '@graphql-typed-document-node/core';\r\nimport { DataService } from '@vendure/admin-ui/core';\r\nimport { DocumentNode } from 'graphql/index';\r\nimport { useCallback, useContext, useEffect, useState } from 'react';\r\nimport { firstValueFrom, Observable } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\r\n\r\n/**\r\n * @description\r\n * A React hook which provides access to the results of a GraphQL query.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useQuery } from '\\@vendure/admin-ui/react';\r\n * import { gql } from 'graphql-tag';\r\n *\r\n * const GET_PRODUCT = gql`\r\n * query GetProduct($id: ID!) {\r\n * product(id: $id) {\r\n * id\r\n * name\r\n * description\r\n * }\r\n * }`;\r\n *\r\n * export const MyComponent = () => {\r\n * const { data, loading, error } = useQuery(GET_PRODUCT, { id: '1' });\r\n *\r\n * if (loading) return <div>Loading...</div>;\r\n * if (error) return <div>Error! { error }</div>;\r\n * return (\r\n * <div>\r\n * <h1>{data.product.name}</h1>\r\n * <p>{data.product.description}</p>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useQuery<T, V extends Record<string, any> = Record<string, any>>(\r\n query: DocumentNode | TypedDocumentNode<T, V>,\r\n variables?: V,\r\n) {\r\n const { data, loading, error, runQuery } = useDataService<T, V>(\r\n (dataService, vars) => dataService.query(query, vars).stream$,\r\n );\r\n useEffect(() => {\r\n const subscription = runQuery(variables).subscribe();\r\n return () => subscription.unsubscribe();\r\n }, [runQuery]);\r\n\r\n const refetch = (variables?: V) => firstValueFrom(runQuery(variables));\r\n return { data, loading, error, refetch } as const;\r\n}\r\n\r\n/**\r\n * @description\r\n * A React hook which allows you to execute a GraphQL mutation.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useMutation } from '\\@vendure/admin-ui/react';\r\n * import { gql } from 'graphql-tag';\r\n *\r\n * const UPDATE_PRODUCT = gql`\r\n * mutation UpdateProduct($input: UpdateProductInput!) {\r\n * updateProduct(input: $input) {\r\n * id\r\n * name\r\n * }\r\n * }`;\r\n *\r\n * export const MyComponent = () => {\r\n * const [updateProduct, { data, loading, error }] = useMutation(UPDATE_PRODUCT);\r\n *\r\n * const handleClick = () => {\r\n * updateProduct({\r\n * input: {\r\n * id: '1',\r\n * name: 'New name',\r\n * },\r\n * }).then(result => {\r\n * // do something with the result\r\n * });\r\n * };\r\n *\r\n * if (loading) return <div>Loading...</div>;\r\n * if (error) return <div>Error! { error }</div>;\r\n *\r\n * return (\r\n * <div>\r\n * <button onClick={handleClick}>Update product</button>\r\n * {data && <div>Product updated!</div>}\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useMutation<T, V extends Record<string, any> = Record<string, any>>(\r\n mutation: DocumentNode | TypedDocumentNode<T, V>,\r\n) {\r\n const { data, loading, error, runQuery } = useDataService<T, V>((dataService, variables) =>\r\n dataService.mutate(mutation, variables),\r\n );\r\n const rest = { data, loading, error };\r\n const execute = (variables?: V) => firstValueFrom(runQuery(variables));\r\n return [execute, rest] as [typeof execute, typeof rest];\r\n}\r\n\r\nexport function useDataService<T, V extends Record<string, any> = Record<string, any>>(\r\n operation: (dataService: DataService, variables?: V) => Observable<T>,\r\n) {\r\n const context = useContext(HostedComponentContext);\r\n const dataService = context?.injector.get(DataService);\r\n if (!dataService) {\r\n throw new Error('No DataService found in HostedComponentContext');\r\n }\r\n\r\n const [data, setData] = useState<T>();\r\n const [error, setError] = useState<string>();\r\n const [loading, setLoading] = useState(false);\r\n\r\n const runQuery = useCallback((variables?: V) => {\r\n setLoading(true);\r\n return operation(dataService, variables).pipe(\r\n tap({\r\n next: res => {\r\n setData(res);\r\n setLoading(false);\r\n },\r\n error: err => {\r\n setError(err.message);\r\n setLoading(false);\r\n },\r\n }),\r\n );\r\n }, []);\r\n\r\n return { data, loading, error, runQuery };\r\n}\r\n","import { ActivatedRoute } from '@angular/router';\r\nimport { useEffect, useState } from 'react';\r\nimport { useInjector } from './use-injector';\r\n\r\n/**\r\n * @description\r\n * Provides access to the current route params and query params.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useRouteParams } from '\\@vendure/admin-ui/react';\r\n * import React from 'react';\r\n *\r\n * export function MyComponent() {\r\n * const { params, queryParams } = useRouteParams();\r\n * // ...\r\n * return <div>{ params.id }</div>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useRouteParams() {\r\n const activatedRoute = useInjector(ActivatedRoute);\r\n const [params, setParams] = useState(activatedRoute.snapshot.params);\r\n const [queryParams, setQueryParams] = useState(activatedRoute.snapshot.queryParams);\r\n\r\n useEffect(() => {\r\n const subscription = activatedRoute.params.subscribe(value => {\r\n setParams(value);\r\n });\r\n subscription.add(activatedRoute.queryParams.subscribe(value => setQueryParams(value)));\r\n return () => subscription.unsubscribe();\r\n }, []);\r\n\r\n activatedRoute;\r\n\r\n return {\r\n params,\r\n queryParams,\r\n };\r\n}\r\n","import { APP_INITIALIZER } from '@angular/core';\r\nimport { CustomDetailComponentLocationId, CustomDetailComponentService } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport {\r\n REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS,\r\n ReactCustomDetailComponent,\r\n} from './components/react-custom-detail.component';\r\n\r\n/**\r\n * @description\r\n * Configures a React-based component to be placed in a detail page in the given location.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport interface ReactCustomDetailComponentConfig {\r\n /**\r\n * @description\r\n * The id of the detail page location in which to place the component.\r\n */\r\n locationId: CustomDetailComponentLocationId;\r\n /**\r\n * @description\r\n * The React component to render.\r\n */\r\n component: ElementType;\r\n /**\r\n * @description\r\n * Optional props to pass to the React component.\r\n */\r\n props?: Record<string, any>;\r\n}\r\n\r\n/**\r\n * @description\r\n * Registers a React component to be rendered in a detail page in the given location.\r\n * Components used as custom detail components can make use of the {@link useDetailComponentData} hook.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport function registerReactCustomDetailComponent(config: ReactCustomDetailComponentConfig) {\r\n return {\r\n provide: APP_INITIALIZER,\r\n multi: true,\r\n useFactory: (customDetailComponentService: CustomDetailComponentService) => () => {\r\n customDetailComponentService.registerCustomDetailComponent({\r\n component: ReactCustomDetailComponent,\r\n locationId: config.locationId,\r\n providers: [\r\n {\r\n provide: REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS,\r\n useValue: {\r\n component: config.component,\r\n props: config.props,\r\n },\r\n },\r\n ],\r\n });\r\n },\r\n deps: [CustomDetailComponentService],\r\n };\r\n}\r\n","import { APP_INITIALIZER } from '@angular/core';\r\nimport {\r\n DataTableColumnId,\r\n DataTableCustomComponentService,\r\n DataTableLocationId,\r\n} from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport {\r\n REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS,\r\n ReactCustomColumnComponent,\r\n} from './components/react-custom-column.component';\r\n\r\n/**\r\n * @description\r\n * Configures a {@link CustomDetailComponent} to be placed in the given location.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport interface ReactDataTableComponentConfig {\r\n /**\r\n * @description\r\n * The location in the UI where the custom component should be placed.\r\n */\r\n tableId: DataTableLocationId;\r\n /**\r\n * @description\r\n * The column in the table where the custom component should be placed.\r\n */\r\n columnId: DataTableColumnId;\r\n /**\r\n * @description\r\n * The component to render in the table cell. This component will receive the `rowItem` prop\r\n * which is the data object for the row, e.g. the `Product` object if used in the `product-list` table.\r\n */\r\n component: ElementType;\r\n /**\r\n * @description\r\n * Optional props to pass to the React component.\r\n */\r\n props?: Record<string, any>;\r\n}\r\n\r\n/**\r\n * @description\r\n * The props that will be passed to the React component registered via {@link registerReactDataTableComponent}.\r\n */\r\nexport interface ReactDataTableComponentProps<T = any> {\r\n rowItem: T;\r\n [prop: string]: any;\r\n}\r\n\r\n/**\r\n * @description\r\n * Registers a React component to be rendered in a data table in the given location.\r\n * The component will receive the `rowItem` prop which is the data object for the row,\r\n * e.g. the `Product` object if used in the `product-list` table.\r\n *\r\n * @example\r\n * ```ts title=\"components/SlugWithLink.tsx\"\r\n * import { ReactDataTableComponentProps } from '\\@vendure/admin-ui/react';\r\n * import React from 'react';\r\n *\r\n * export function SlugWithLink({ rowItem }: ReactDataTableComponentProps<{ slug: string }>) {\r\n * return (\r\n * <a href={`https://example.com/products/${rowItem.slug}`} target=\"_blank\">\r\n * {rowItem.slug}\r\n * </a>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * ```ts title=\"providers.ts\"\r\n * import { registerReactDataTableComponent } from '\\@vendure/admin-ui/react';\r\n * import { SlugWithLink } from './components/SlugWithLink';\r\n *\r\n * export default [\r\n * registerReactDataTableComponent({\r\n * component: SlugWithLink,\r\n * tableId: 'product-list',\r\n * columnId: 'slug',\r\n * props: {\r\n * foo: 'bar',\r\n * },\r\n * }),\r\n * ];\r\n * ```\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport function registerReactDataTableComponent(config: ReactDataTableComponentConfig) {\r\n return {\r\n provide: APP_INITIALIZER,\r\n multi: true,\r\n useFactory: (dataTableCustomComponentService: DataTableCustomComponentService) => () => {\r\n dataTableCustomComponentService.registerCustomComponent({\r\n ...config,\r\n component: ReactCustomColumnComponent,\r\n providers: [\r\n {\r\n provide: REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS,\r\n useValue: {\r\n component: config.component,\r\n props: config.props,\r\n },\r\n },\r\n ],\r\n });\r\n },\r\n deps: [DataTableCustomComponentService],\r\n };\r\n}\r\n","import { APP_INITIALIZER, FactoryProvider } from '@angular/core';\r\nimport { ComponentRegistryService } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport {\r\n REACT_INPUT_COMPONENT_OPTIONS,\r\n ReactFormInputComponent,\r\n} from './components/react-form-input.component';\r\n\r\n/**\r\n * @description\r\n * Registers a React component to be used as a {@link FormInputComponent}.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport function registerReactFormInputComponent(id: string, component: ElementType): FactoryProvider {\r\n return {\r\n provide: APP_INITIALIZER,\r\n multi: true,\r\n useFactory: (registry: ComponentRegistryService) => () => {\r\n registry.registerInputComponent(id, ReactFormInputComponent, [\r\n {\r\n provide: REACT_INPUT_COMPONENT_OPTIONS,\r\n useValue: {\r\n component,\r\n },\r\n },\r\n ]);\r\n },\r\n deps: [ComponentRegistryService],\r\n };\r\n}\r\n","import { Route } from '@angular/router';\r\nimport { ResultOf, TypedDocumentNode } from '@graphql-typed-document-node/core';\r\nimport { registerRouteComponent, RegisterRouteComponentOptions } from '@vendure/admin-ui/core';\r\nimport { DocumentNode } from 'graphql/index';\r\nimport { ElementType } from 'react';\r\nimport { REACT_ROUTE_COMPONENT_OPTIONS, ReactRouteComponent } from './components/react-route.component';\r\nimport { ReactRouteComponentOptions } from './types';\r\n\r\n/**\r\n * @description\r\n * Configuration for a React-based route component.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\ntype RegisterReactRouteComponentOptions<\r\n Entity extends { id: string; updatedAt?: string },\r\n T extends DocumentNode | TypedDocumentNode<any, { id: string }>,\r\n Field extends keyof ResultOf<T>,\r\n R extends Field,\r\n> = RegisterRouteComponentOptions<ElementType, Entity, T, Field, R> & {\r\n props?: Record<string, any>;\r\n};\r\n\r\n/**\r\n * @description\r\n * Registers a React component to be used as a route component.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport function registerReactRouteComponent<\r\n Entity extends { id: string; updatedAt?: string },\r\n T extends DocumentNode | TypedDocumentNode<any, { id: string }>,\r\n Field extends keyof ResultOf<T>,\r\n R extends Field,\r\n>(options: RegisterReactRouteComponentOptions<Entity, T, Field, R>): Route {\r\n const routeDef = registerRouteComponent(options);\r\n return {\r\n ...routeDef,\r\n providers: [\r\n {\r\n provide: REACT_ROUTE_COMPONENT_OPTIONS,\r\n useValue: {\r\n props: options.props,\r\n } satisfies ReactRouteComponentOptions,\r\n },\r\n ...(routeDef.providers ?? []),\r\n ],\r\n component: ReactRouteComponent,\r\n };\r\n}\r\n","// This file was generated by the build-public-api.ts script\nexport * from './components/react-custom-column.component';\nexport * from './components/react-custom-detail.component';\nexport * from './components/react-form-input.component';\nexport * from './components/react-route.component';\nexport * from './directives/react-component-host.directive';\nexport * from './react-components/ActionBar';\nexport * from './react-components/Card';\nexport * from './react-components/CdsIcon';\nexport * from './react-components/FormField';\nexport * from './react-components/Link';\nexport * from './react-components/PageBlock';\nexport * from './react-components/PageDetailLayout';\nexport * from './react-hooks/use-detail-component-data';\nexport * from './react-hooks/use-form-control';\nexport * from './react-hooks/use-injector';\nexport * from './react-hooks/use-page-metadata';\nexport * from './react-hooks/use-query';\nexport * from './react-hooks/use-route-params';\nexport * from './register-react-custom-detail-component';\nexport * from './register-react-data-table-component';\nexport * from './register-react-form-input-component';\nexport * from './register-react-route-component';\nexport * from './types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAMa,sBAAsB,GAAG,aAAa,CAAqC,IAAI,EAAE;AAE9F;;AAEG;MAKU,2BAA2B,CAAA;AAOpC,IAAA,WAAA,CACY,IAAgB,EAChB,QAAkB,EACN,mBAAyC,EAAA;QAFrD,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAChB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QACN,IAAmB,CAAA,mBAAA,GAAnB,mBAAmB,CAAsB;QAPxD,IAAO,CAAA,OAAA,GAAwB,EAAE,CAAC;QAEnC,IAAI,CAAA,IAAA,GAAgB,IAAI,CAAC;KAM7B;AAEJ,IAAA,MAAM,WAAW,GAAA;AACb,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC;AAEjC,QAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACZ,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AACnD,SAAA;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,CACZ,aAAa,CACT,sBAAsB,CAAC,QAAQ,EAC/B;AACI,YAAA,KAAK,EAAE;gBACH,GAAG,IAAI,CAAC,KAAK;gBACb,GAAG,IAAI,CAAC,OAAO;gBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;AAChD,aAAA;SACJ,EACD,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAClC,CACJ,CAAC;KACL;IAED,WAAW,GAAA;AACP,QAAA,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC;KACxB;8GAtCQ,2BAA2B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EA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O,CAAC,CAAC;IACjD,OAAO;AACH,QAAA,GAAG,QAAQ;AACX,QAAA,SAAS,EAAE;AACP,YAAA;AACI,gBAAA,OAAO,EAAE,6BAA6B;AACtC,gBAAA,QAAQ,EAAE;oBACN,KAAK,EAAE,OAAO,CAAC,KAAK;AACc,iBAAA;AACzC,aAAA;AACD,YAAA,IAAI,QAAQ,CAAC,SAAS,IAAI,EAAE,CAAC;AAChC,SAAA;AACD,QAAA,SAAS,EAAE,mBAAmB;KACjC,CAAC;AACN;;ACjDA;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"vendure-admin-ui-react.mjs","sources":["../../src/lib/react/src/directives/react-component-host.directive.ts","../../src/lib/react/src/components/react-custom-column.component.ts","../../src/lib/react/src/components/react-custom-detail.component.ts","../../src/lib/react/src/components/react-form-input.component.ts","../../src/lib/react/src/components/react-route.component.ts","../../src/lib/react/src/react-components/ActionBar.tsx","../../src/lib/react/src/react-components/Card.tsx","../../src/lib/react/src/react-components/CdsIcon.tsx","../../src/lib/react/src/react-components/FormField.tsx","../../src/lib/react/src/react-hooks/use-injector.ts","../../src/lib/react/src/react-components/Link.tsx","../../src/lib/react/src/react-components/PageBlock.tsx","../../src/lib/react/src/react-components/PageDetailLayout.tsx","../../src/lib/react/src/react-hooks/use-detail-component-data.ts","../../src/lib/react/src/react-hooks/use-form-control.ts","../../src/lib/react/src/react-hooks/use-page-metadata.ts","../../src/lib/react/src/react-hooks/use-query.ts","../../src/lib/react/src/react-hooks/use-route-params.ts","../../src/lib/react/src/register-react-custom-detail-component.ts","../../src/lib/react/src/register-react-data-table-component.ts","../../src/lib/react/src/register-react-form-input-component.ts","../../src/lib/react/src/register-react-route-component.ts","../../src/lib/react/src/public_api.ts","../../src/lib/react/src/vendure-admin-ui-react.ts"],"sourcesContent":["import { Directive, ElementRef, Injector, Input, Optional } from '@angular/core';\r\nimport { PageMetadataService } from '@vendure/admin-ui/core';\r\nimport { ComponentProps, createContext, createElement, ElementType } from 'react';\r\nimport { createRoot, Root } from 'react-dom/client';\r\nimport { HostedReactComponentContext } from '../types';\r\n\r\nexport const HostedComponentContext = createContext<HostedReactComponentContext | null>(null);\r\n\r\n/**\r\n * Based on https://netbasal.com/using-react-in-angular-applications-1bb907ecac91\r\n */\r\n@Directive({\r\n selector: '[vdrReactComponentHost]',\r\n standalone: true,\r\n})\r\nexport class ReactComponentHostDirective<Comp extends ElementType> {\r\n @Input('vdrReactComponentHost') reactComponent: Comp;\r\n @Input() props: ComponentProps<Comp>;\r\n @Input() context: Record<string, any> = {};\r\n\r\n private root: Root | null = null;\r\n\r\n constructor(\r\n private host: ElementRef,\r\n private injector: Injector,\r\n @Optional() private pageMetadataService?: PageMetadataService,\r\n ) {}\r\n\r\n async ngOnChanges() {\r\n const Comp = this.reactComponent;\r\n\r\n if (!this.root) {\r\n this.root = createRoot(this.host.nativeElement);\r\n }\r\n\r\n this.root.render(\r\n createElement(\r\n HostedComponentContext.Provider,\r\n {\r\n value: {\r\n ...this.props,\r\n ...this.context,\r\n injector: this.injector,\r\n pageMetadataService: this.pageMetadataService,\r\n },\r\n },\r\n createElement(Comp, this.props),\r\n ),\r\n );\r\n }\r\n\r\n ngOnDestroy() {\r\n this.root?.unmount();\r\n }\r\n}\r\n","import { Component, inject, InjectionToken, Input, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { CustomColumnComponent } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport { ReactComponentHostDirective } from '../directives/react-component-host.directive';\r\n\r\nexport const REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS = new InjectionToken<{\r\n component: ElementType;\r\n props?: Record<string, any>;\r\n}>('REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS');\r\n\r\n@Component({\r\n selector: 'vdr-react-custom-column-component',\r\n template: ` <div [vdrReactComponentHost]=\"reactComponent\" [props]=\"props\"></div> `,\r\n styleUrls: ['./react-global-styles.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n imports: [ReactComponentHostDirective],\r\n})\r\nexport class ReactCustomColumnComponent implements CustomColumnComponent, OnInit {\r\n @Input() rowItem: any;\r\n\r\n protected reactComponent = inject(REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS).component;\r\n private options = inject(REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS);\r\n protected props: Record<string, any>;\r\n\r\n ngOnInit() {\r\n this.props = {\r\n rowItem: this.rowItem,\r\n ...(this.options.props ?? {}),\r\n };\r\n }\r\n}\r\n","import { Component, inject, InjectionToken, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { FormGroup, UntypedFormGroup } from '@angular/forms';\r\nimport { CustomDetailComponent } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport { Observable } from 'rxjs';\r\nimport { ReactComponentHostDirective } from '../directives/react-component-host.directive';\r\n\r\nexport const REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS = new InjectionToken<{\r\n component: ElementType;\r\n props?: Record<string, any>;\r\n}>('REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS');\r\n\r\nexport interface ReactCustomDetailComponentContext {\r\n detailForm: FormGroup;\r\n entity$: Observable<any>;\r\n}\r\n\r\n@Component({\r\n selector: 'vdr-react-custom-detail-component',\r\n template: ` <div [vdrReactComponentHost]=\"reactComponent\" [context]=\"context\" [props]=\"props\"></div> `,\r\n styleUrls: ['./react-global-styles.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n imports: [ReactComponentHostDirective],\r\n})\r\nexport class ReactCustomDetailComponent implements CustomDetailComponent, OnInit {\r\n detailForm: UntypedFormGroup;\r\n entity$: Observable<any>;\r\n protected props = inject(REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS).props ?? {};\r\n protected reactComponent = inject(REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS).component;\r\n protected context: ReactCustomDetailComponentContext;\r\n\r\n ngOnInit() {\r\n this.context = {\r\n detailForm: this.detailForm,\r\n entity$: this.entity$,\r\n };\r\n }\r\n}\r\n","import { Component, inject, InjectionToken, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { FormControl } from '@angular/forms';\r\nimport { CustomField, FormInputComponent } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport { ReactComponentHostDirective } from '../directives/react-component-host.directive';\r\nimport { ReactFormInputOptions } from '../types';\r\n\r\nexport const REACT_INPUT_COMPONENT_OPTIONS = new InjectionToken<{\r\n component: ElementType;\r\n}>('REACT_INPUT_COMPONENT_OPTIONS');\r\n\r\n@Component({\r\n selector: 'vdr-react-form-input-component',\r\n template: ` <div [vdrReactComponentHost]=\"reactComponent\" [context]=\"context\" [props]=\"context\"></div> `,\r\n styleUrls: ['./react-global-styles.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n imports: [ReactComponentHostDirective],\r\n})\r\nexport class ReactFormInputComponent implements FormInputComponent, OnInit {\r\n static readonly id: string = 'react-form-input-component';\r\n readonly: boolean;\r\n formControl: FormControl;\r\n config: CustomField & Record<string, any>;\r\n\r\n protected context: ReactFormInputOptions;\r\n\r\n protected reactComponent = inject(REACT_INPUT_COMPONENT_OPTIONS).component;\r\n\r\n ngOnInit() {\r\n this.context = {\r\n formControl: this.formControl,\r\n readonly: this.readonly,\r\n config: this.config,\r\n };\r\n }\r\n}\r\n","import { Component, inject, InjectionToken, ViewEncapsulation } from '@angular/core';\r\nimport { ROUTE_COMPONENT_OPTIONS, RouteComponent, SharedModule } from '@vendure/admin-ui/core';\r\nimport { ReactComponentHostDirective } from '../directives/react-component-host.directive';\r\nimport { ReactRouteComponentOptions } from '../types';\r\n\r\nexport const REACT_ROUTE_COMPONENT_OPTIONS = new InjectionToken<ReactRouteComponentOptions>(\r\n 'REACT_ROUTE_COMPONENT_OPTIONS',\r\n);\r\n\r\n@Component({\r\n selector: 'vdr-react-route-component',\r\n template: `\r\n <vdr-route-component\r\n ><div [vdrReactComponentHost]=\"reactComponent\" [props]=\"props\"></div\r\n ></vdr-route-component>\r\n `,\r\n styleUrls: ['./react-global-styles.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n imports: [ReactComponentHostDirective, RouteComponent, SharedModule],\r\n})\r\nexport class ReactRouteComponent {\r\n protected props = inject(REACT_ROUTE_COMPONENT_OPTIONS).props;\r\n protected reactComponent = inject(ROUTE_COMPONENT_OPTIONS).component;\r\n}\r\n","import React, { PropsWithChildren, ReactNode } from 'react';\r\n\r\n/**\r\n * @description\r\n * A container for the primary actions on a list or detail page\r\n *\r\n * @example\r\n * ```ts\r\n * import { ActionBar } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyComponent() {\r\n * return (\r\n * <ActionBar leftContent={<div>Optional left content</div>}>\r\n * <button className='button primary'>Primary action</button>\r\n * </ActionBar>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function ActionBar(props: PropsWithChildren<{ leftContent?: ReactNode }>) {\r\n return (\r\n <div className={'vdr-action-bar'}>\r\n <div className=\"left-content\">{props.leftContent}</div>\r\n <div className=\"right-content\">{props.children}</div>\r\n </div>\r\n );\r\n}\r\n","import React, { PropsWithChildren } from 'react';\r\n\r\n/**\r\n * @description\r\n * A card component which can be used to group related content.\r\n *\r\n * @example\r\n * ```ts\r\n * import { Card } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyComponent() {\r\n * return (\r\n * <Card title='My Title'>\r\n * <p>Some content</p>\r\n * </Card>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function Card(props: PropsWithChildren<{ title?: string; paddingX?: boolean }>) {\r\n return (\r\n <div className={'vdr-card'}>\r\n <div className={`card-container ${props.paddingX !== false ? 'padding-x' : ''}`}>\r\n {props.title && (\r\n <div className={'title-row'}>\r\n <div className=\"title\">{props.title}</div>\r\n </div>\r\n )}\r\n <div className=\"contents\">{props.children}</div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import { ClarityIcons } from '@cds/core/icon';\r\nimport { IconShapeTuple } from '@cds/core/icon/interfaces/icon.interfaces';\r\nimport React, { DOMAttributes, useEffect } from 'react';\r\n\r\ntype CustomElement<T> = Partial<T & DOMAttributes<T> & { children: any }>;\r\n\r\nexport interface CdsIconProps {\r\n shape: string;\r\n size: string | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';\r\n direction: 'up' | 'down' | 'left' | 'right';\r\n flip: 'horizontal' | 'vertical';\r\n solid: boolean;\r\n status: 'info' | 'success' | 'warning' | 'danger';\r\n inverse: boolean;\r\n badge: 'info' | 'success' | 'warning' | 'danger';\r\n}\r\n\r\ndeclare global {\r\n namespace JSX {\r\n interface IntrinsicElements {\r\n ['cds-icon']: CustomElement<CdsIconProps>;\r\n }\r\n }\r\n}\r\n\r\nexport function registerCdsIcon(icon: IconShapeTuple) {\r\n ClarityIcons.addIcons(icon);\r\n}\r\n\r\n/**\r\n * @description\r\n * A React wrapper for the Clarity UI icon component.\r\n *\r\n * @example\r\n * ```ts\r\n * import { userIcon } from '@cds/core/icon';\r\n * import { CdsIcon } from '@vendure/admin-ui/react';\r\n *\r\n * registerCdsIcon(userIcon);\r\n * export function MyComponent() {\r\n * return <CdsIcon icon={userIcon} badge=\"warning\" solid size=\"lg\"></CdsIcon>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function CdsIcon(props: { icon: IconShapeTuple; className?: string } & Partial<CdsIconProps>) {\r\n const { icon, ...rest } = props;\r\n useEffect(() => {\r\n ClarityIcons.addIcons(icon);\r\n }, [icon]);\r\n return <cds-icon {...rest} shape={icon[0]}></cds-icon>;\r\n}\r\n","import React, { PropsWithChildren } from 'react';\r\n\r\n/**\r\n * @description\r\n * A wrapper around form fields which provides a label, tooltip and error message.\r\n *\r\n * @example\r\n * ```ts\r\n * import { FormField } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyReactComponent() {\r\n * return (\r\n * <FormField label=\"My field\" tooltip=\"This is a tooltip\" invalid errorMessage=\"This field is invalid\">\r\n * <input type=\"text\" />\r\n * </FormField>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function FormField(\r\n props: PropsWithChildren<{\r\n for?: string;\r\n label?: string;\r\n tooltip?: string;\r\n invalid?: boolean;\r\n errorMessage?: string;\r\n }>,\r\n) {\r\n return (\r\n <div\r\n className={`form-group ` + (!props.label ? 'no-label' : '') + (props.invalid ? 'clr-error' : '')}\r\n >\r\n {props.label && <label htmlFor={props.for ?? ''}>{props.label}</label>}\r\n {props.tooltip && <div className=\"tooltip-text\">{props.tooltip}</div>}\r\n <div className={`input-row ` + (props.invalid ? 'invalid' : '')}>{props.children}</div>\r\n {props.errorMessage && <div className=\"error-message\">{props.errorMessage}</div>}\r\n </div>\r\n );\r\n}\r\n","import { ProviderToken } from '@angular/core';\r\nimport { useContext } from 'react';\r\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\r\n\r\n/**\r\n * @description\r\n * Exposes the Angular injector which allows the injection of services into React components.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useInjector } from '\\@vendure/admin-ui/react';\r\n * import { NotificationService } from '\\@vendure/admin-ui/core';\r\n *\r\n * export const MyComponent = () => {\r\n * const notificationService = useInjector(NotificationService);\r\n *\r\n * const handleClick = () => {\r\n * notificationService.success('Hello world!');\r\n * };\r\n * // ...\r\n * return <div>...</div>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useInjector<T = any>(token: ProviderToken<T>): T {\r\n const context = useContext(HostedComponentContext);\r\n const instance = context?.injector.get(token);\r\n if (!instance) {\r\n throw new Error(`Could not inject ${(token as any).name ?? token.toString()}`);\r\n }\r\n return instance;\r\n}\r\n","import { Router } from '@angular/router';\r\nimport React, { PropsWithChildren } from 'react';\r\nimport { useInjector } from '../react-hooks/use-injector';\r\n\r\n/**\r\n * @description\r\n * A React component which renders an anchor tag and navigates to the specified route when clicked.\r\n * This is useful when you want to use a React component in a Vendure UI plugin which navigates to\r\n * a route in the admin-ui.\r\n *\r\n * @example\r\n * ```ts\r\n * import { Link } from '@vendure/admin-ui/react';\r\n *\r\n * export const MyReactComponent = () => {\r\n * return <Link href=\"/extensions/my-extension\">Go to my extension</Link>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function Link(props: PropsWithChildren<{ href: string; [props: string]: any }>) {\r\n const router = useInjector(Router);\r\n const { href, ...rest } = props;\r\n\r\n function onClick(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {\r\n e.preventDefault();\r\n void router.navigateByUrl(href);\r\n }\r\n\r\n return (\r\n <a href={href} onClick={onClick} {...rest}>\r\n {props.children}\r\n </a>\r\n );\r\n}\r\n","import React, { PropsWithChildren } from 'react';\r\n\r\n/**\r\n * @description\r\n * A container for page content which provides a consistent width and spacing.\r\n *\r\n * @example\r\n * ```ts\r\n * import { PageBlock } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyComponent() {\r\n * return (\r\n * <PageBlock>\r\n * ...\r\n * </PageBlock>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function PageBlock(props: PropsWithChildren) {\r\n return <div className=\"page-block\">{props.children}</div>;\r\n}\r\n","import React, { PropsWithChildren, ReactNode } from 'react';\r\n\r\n/**\r\n * @description\r\n * A responsive container for detail views with a main content area and an optional sidebar.\r\n *\r\n * @example\r\n * ```ts\r\n * import { PageDetailLayout } from '@vendure/admin-ui/react';\r\n *\r\n * export function MyComponent() {\r\n * return (\r\n * <PageDetailLayout sidebar={<div>Sidebar content</div>}>\r\n * <div>Main content</div>\r\n * </PageDetailLayout>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-components\r\n */\r\nexport function PageDetailLayout(props: PropsWithChildren<{ sidebar?: ReactNode }>) {\r\n return (\r\n <div className={'vdr-page-detail-layout'}>\r\n <div className=\"main\">{props.children}</div>\r\n <div className=\"sidebar\">{props.sidebar}</div>\r\n </div>\r\n );\r\n}\r\n","import { useContext, useEffect, useState } from 'react';\r\nimport { ReactCustomDetailComponentContext } from '../components/react-custom-detail.component';\r\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\r\nimport { HostedReactComponentContext } from '../types';\r\n\r\n/**\r\n * @description\r\n * Provides the data available to React-based CustomDetailComponents.\r\n *\r\n * @example\r\n * ```ts\r\n * import { Card, useDetailComponentData } from '\\@vendure/admin-ui/react';\r\n * import React from 'react';\r\n *\r\n * export function CustomDetailComponent(props: any) {\r\n * const { entity, detailForm } = useDetailComponentData();\r\n * const updateName = () => {\r\n * detailForm.get('name')?.setValue('New name');\r\n * detailForm.markAsDirty();\r\n * };\r\n * return (\r\n * <Card title={'Custom Detail Component'}>\r\n * <button className=\"button\" onClick={updateName}>\r\n * Update name\r\n * </button>\r\n * <pre>{JSON.stringify(entity, null, 2)}</pre>\r\n * </Card>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useDetailComponentData<T = any>() {\r\n const context = useContext(\r\n HostedComponentContext,\r\n ) as HostedReactComponentContext<ReactCustomDetailComponentContext>;\r\n\r\n if (!context.detailForm || !context.entity$) {\r\n throw new Error(`The useDetailComponentData hook can only be used within a CustomDetailComponent`);\r\n }\r\n\r\n const [entity, setEntity] = useState<T | null>(null);\r\n\r\n useEffect(() => {\r\n const subscription = context.entity$.subscribe(value => {\r\n setEntity(value);\r\n });\r\n return () => subscription.unsubscribe();\r\n }, []);\r\n\r\n return {\r\n entity,\r\n detailForm: context.detailForm,\r\n };\r\n}\r\n","import { CustomFieldType } from '@vendure/common/lib/shared-types';\nimport { useContext, useEffect, useState } from 'react';\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\nimport { HostedReactComponentContext, ReactFormInputOptions } from '../types';\n\n/**\n * @description\n * Provides access to the current FormControl value and a method to update the value.\n *\n * @example\n * ```ts\n * import { useFormControl, ReactFormInputProps } from '\\@vendure/admin-ui/react';\n * import React from 'react';\n *\n * export function ReactNumberInput({ readonly }: ReactFormInputProps) {\n * const { value, setFormValue } = useFormControl();\n *\n * const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n * setFormValue(val);\n * };\n * return (\n * <div>\n * <input readOnly={readonly} type=\"number\" onChange={handleChange} value={value} />\n * </div>\n * );\n * }\n * ```\n *\n * @docsCategory react-hooks\n */\nexport function useFormControl() {\n const context = useContext(HostedComponentContext);\n if (!context) {\n throw new Error('No HostedComponentContext found');\n }\n if (!isFormInputContext(context)) {\n throw new Error('useFormControl() can only be used in a form input component');\n }\n const { formControl, config } = context;\n const [value, setValue] = useState(formControl.value ?? 0);\n\n useEffect(() => {\n const subscription = formControl.valueChanges.subscribe(v => {\n setValue(v);\n });\n return () => {\n subscription.unsubscribe();\n };\n }, []);\n\n function setFormValue(newValue: any) {\n formControl.setValue(coerceFormValue(newValue, config.type as CustomFieldType));\n formControl.markAsDirty();\n }\n\n return { value, setFormValue };\n}\n\nfunction isFormInputContext(\n context: HostedReactComponentContext,\n): context is HostedReactComponentContext<ReactFormInputOptions> {\n return context.config && context.formControl;\n}\n\nfunction coerceFormValue(value: any, type: CustomFieldType) {\n switch (type) {\n case 'int':\n case 'float':\n return Number(value);\n case 'boolean':\n return Boolean(value);\n default:\n return value;\n }\n}\n","import { BreadcrumbValue } from '@vendure/admin-ui/core';\r\nimport { useContext } from 'react';\r\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\r\nimport { HostedReactComponentContext, ReactRouteComponentOptions } from '../types';\r\n\r\n/**\r\n * @description\r\n * Provides functions for setting the current page title and breadcrumb.\r\n *\r\n * @example\r\n * ```ts\r\n * import { usePageMetadata } from '\\@vendure/admin-ui/react';\r\n * import { useEffect } from 'react';\r\n *\r\n * export const MyComponent = () => {\r\n * const { setTitle, setBreadcrumb } = usePageMetadata();\r\n * useEffect(() => {\r\n * setTitle('My Page');\r\n * setBreadcrumb([\r\n * { link: ['./parent'], label: 'Parent Page' },\r\n * { link: ['./'], label: 'This Page' },\r\n * ]);\r\n * }, []);\r\n * // ...\r\n * return <div>...</div>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function usePageMetadata() {\r\n const context = useContext(\r\n HostedComponentContext,\r\n ) as HostedReactComponentContext<ReactRouteComponentOptions>;\r\n const setBreadcrumb = (newValue: BreadcrumbValue) => {\r\n context.pageMetadataService?.setBreadcrumbs(newValue);\r\n };\r\n const setTitle = (newTitle: string) => {\r\n context.pageMetadataService?.setTitle(newTitle);\r\n };\r\n\r\n return {\r\n setBreadcrumb,\r\n setTitle,\r\n };\r\n}\r\n","import { TypedDocumentNode } from '@graphql-typed-document-node/core';\r\nimport { DataService } from '@vendure/admin-ui/core';\r\nimport { DocumentNode } from 'graphql/index';\r\nimport { useCallback, useContext, useEffect, useState } from 'react';\r\nimport { firstValueFrom, Observable } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\nimport { HostedComponentContext } from '../directives/react-component-host.directive';\r\n\r\n/**\r\n * @description\r\n * A React hook which provides access to the results of a GraphQL query.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useQuery } from '\\@vendure/admin-ui/react';\r\n * import { gql } from 'graphql-tag';\r\n *\r\n * const GET_PRODUCT = gql`\r\n * query GetProduct($id: ID!) {\r\n * product(id: $id) {\r\n * id\r\n * name\r\n * description\r\n * }\r\n * }`;\r\n *\r\n * export const MyComponent = () => {\r\n * const { data, loading, error } = useQuery(GET_PRODUCT, { id: '1' });\r\n *\r\n * if (loading) return <div>Loading...</div>;\r\n * if (error) return <div>Error! { error }</div>;\r\n * return (\r\n * <div>\r\n * <h1>{data.product.name}</h1>\r\n * <p>{data.product.description}</p>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useQuery<T, V extends Record<string, any> = Record<string, any>>(\r\n query: DocumentNode | TypedDocumentNode<T, V>,\r\n variables?: V,\r\n) {\r\n const { data, loading, error, runQuery } = useDataService<T, V>(\r\n (dataService, vars) => dataService.query(query, vars).stream$,\r\n );\r\n useEffect(() => {\r\n const subscription = runQuery(variables).subscribe();\r\n return () => subscription.unsubscribe();\r\n }, [runQuery]);\r\n\r\n const refetch = (variables?: V) => firstValueFrom(runQuery(variables));\r\n return { data, loading, error, refetch } as const;\r\n}\r\n\r\n/**\r\n * @description\r\n * A React hook which allows you to execute a GraphQL mutation.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useMutation } from '\\@vendure/admin-ui/react';\r\n * import { gql } from 'graphql-tag';\r\n *\r\n * const UPDATE_PRODUCT = gql`\r\n * mutation UpdateProduct($input: UpdateProductInput!) {\r\n * updateProduct(input: $input) {\r\n * id\r\n * name\r\n * }\r\n * }`;\r\n *\r\n * export const MyComponent = () => {\r\n * const [updateProduct, { data, loading, error }] = useMutation(UPDATE_PRODUCT);\r\n *\r\n * const handleClick = () => {\r\n * updateProduct({\r\n * input: {\r\n * id: '1',\r\n * name: 'New name',\r\n * },\r\n * }).then(result => {\r\n * // do something with the result\r\n * });\r\n * };\r\n *\r\n * if (loading) return <div>Loading...</div>;\r\n * if (error) return <div>Error! { error }</div>;\r\n *\r\n * return (\r\n * <div>\r\n * <button onClick={handleClick}>Update product</button>\r\n * {data && <div>Product updated!</div>}\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useMutation<T, V extends Record<string, any> = Record<string, any>>(\r\n mutation: DocumentNode | TypedDocumentNode<T, V>,\r\n) {\r\n const { data, loading, error, runQuery } = useDataService<T, V>((dataService, variables) =>\r\n dataService.mutate(mutation, variables),\r\n );\r\n const rest = { data, loading, error };\r\n const execute = (variables?: V) => firstValueFrom(runQuery(variables));\r\n return [execute, rest] as [typeof execute, typeof rest];\r\n}\r\n\r\nexport function useDataService<T, V extends Record<string, any> = Record<string, any>>(\r\n operation: (dataService: DataService, variables?: V) => Observable<T>,\r\n) {\r\n const context = useContext(HostedComponentContext);\r\n const dataService = context?.injector.get(DataService);\r\n if (!dataService) {\r\n throw new Error('No DataService found in HostedComponentContext');\r\n }\r\n\r\n const [data, setData] = useState<T>();\r\n const [error, setError] = useState<string>();\r\n const [loading, setLoading] = useState(false);\r\n\r\n const runQuery = useCallback((variables?: V) => {\r\n setLoading(true);\r\n return operation(dataService, variables).pipe(\r\n tap({\r\n next: res => {\r\n setData(res);\r\n setLoading(false);\r\n },\r\n error: err => {\r\n setError(err.message);\r\n setLoading(false);\r\n },\r\n }),\r\n );\r\n }, []);\r\n\r\n return { data, loading, error, runQuery };\r\n}\r\n","import { ActivatedRoute } from '@angular/router';\r\nimport { useEffect, useState } from 'react';\r\nimport { useInjector } from './use-injector';\r\n\r\n/**\r\n * @description\r\n * Provides access to the current route params and query params.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useRouteParams } from '\\@vendure/admin-ui/react';\r\n * import React from 'react';\r\n *\r\n * export function MyComponent() {\r\n * const { params, queryParams } = useRouteParams();\r\n * // ...\r\n * return <div>{ params.id }</div>;\r\n * }\r\n * ```\r\n *\r\n * @docsCategory react-hooks\r\n */\r\nexport function useRouteParams() {\r\n const activatedRoute = useInjector(ActivatedRoute);\r\n const [params, setParams] = useState(activatedRoute.snapshot.params);\r\n const [queryParams, setQueryParams] = useState(activatedRoute.snapshot.queryParams);\r\n\r\n useEffect(() => {\r\n const subscription = activatedRoute.params.subscribe(value => {\r\n setParams(value);\r\n });\r\n subscription.add(activatedRoute.queryParams.subscribe(value => setQueryParams(value)));\r\n return () => subscription.unsubscribe();\r\n }, []);\r\n\r\n activatedRoute;\r\n\r\n return {\r\n params,\r\n queryParams,\r\n };\r\n}\r\n","import { APP_INITIALIZER } from '@angular/core';\r\nimport { CustomDetailComponentLocationId, CustomDetailComponentService } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport {\r\n REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS,\r\n ReactCustomDetailComponent,\r\n} from './components/react-custom-detail.component';\r\n\r\n/**\r\n * @description\r\n * Configures a React-based component to be placed in a detail page in the given location.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport interface ReactCustomDetailComponentConfig {\r\n /**\r\n * @description\r\n * The id of the detail page location in which to place the component.\r\n */\r\n locationId: CustomDetailComponentLocationId;\r\n /**\r\n * @description\r\n * The React component to render.\r\n */\r\n component: ElementType;\r\n /**\r\n * @description\r\n * Optional props to pass to the React component.\r\n */\r\n props?: Record<string, any>;\r\n}\r\n\r\n/**\r\n * @description\r\n * Registers a React component to be rendered in a detail page in the given location.\r\n * Components used as custom detail components can make use of the {@link useDetailComponentData} hook.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport function registerReactCustomDetailComponent(config: ReactCustomDetailComponentConfig) {\r\n return {\r\n provide: APP_INITIALIZER,\r\n multi: true,\r\n useFactory: (customDetailComponentService: CustomDetailComponentService) => () => {\r\n customDetailComponentService.registerCustomDetailComponent({\r\n component: ReactCustomDetailComponent,\r\n locationId: config.locationId,\r\n providers: [\r\n {\r\n provide: REACT_CUSTOM_DETAIL_COMPONENT_OPTIONS,\r\n useValue: {\r\n component: config.component,\r\n props: config.props,\r\n },\r\n },\r\n ],\r\n });\r\n },\r\n deps: [CustomDetailComponentService],\r\n };\r\n}\r\n","import { APP_INITIALIZER } from '@angular/core';\r\nimport {\r\n DataTableColumnId,\r\n DataTableCustomComponentService,\r\n DataTableLocationId,\r\n} from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport {\r\n REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS,\r\n ReactCustomColumnComponent,\r\n} from './components/react-custom-column.component';\r\n\r\n/**\r\n * @description\r\n * Configures a {@link CustomDetailComponent} to be placed in the given location.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport interface ReactDataTableComponentConfig {\r\n /**\r\n * @description\r\n * The location in the UI where the custom component should be placed.\r\n */\r\n tableId: DataTableLocationId;\r\n /**\r\n * @description\r\n * The column in the table where the custom component should be placed.\r\n */\r\n columnId: DataTableColumnId;\r\n /**\r\n * @description\r\n * The component to render in the table cell. This component will receive the `rowItem` prop\r\n * which is the data object for the row, e.g. the `Product` object if used in the `product-list` table.\r\n */\r\n component: ElementType;\r\n /**\r\n * @description\r\n * Optional props to pass to the React component.\r\n */\r\n props?: Record<string, any>;\r\n}\r\n\r\n/**\r\n * @description\r\n * The props that will be passed to the React component registered via {@link registerReactDataTableComponent}.\r\n */\r\nexport interface ReactDataTableComponentProps<T = any> {\r\n rowItem: T;\r\n [prop: string]: any;\r\n}\r\n\r\n/**\r\n * @description\r\n * Registers a React component to be rendered in a data table in the given location.\r\n * The component will receive the `rowItem` prop which is the data object for the row,\r\n * e.g. the `Product` object if used in the `product-list` table.\r\n *\r\n * @example\r\n * ```ts title=\"components/SlugWithLink.tsx\"\r\n * import { ReactDataTableComponentProps } from '\\@vendure/admin-ui/react';\r\n * import React from 'react';\r\n *\r\n * export function SlugWithLink({ rowItem }: ReactDataTableComponentProps<{ slug: string }>) {\r\n * return (\r\n * <a href={`https://example.com/products/${rowItem.slug}`} target=\"_blank\">\r\n * {rowItem.slug}\r\n * </a>\r\n * );\r\n * }\r\n * ```\r\n *\r\n * ```ts title=\"providers.ts\"\r\n * import { registerReactDataTableComponent } from '\\@vendure/admin-ui/react';\r\n * import { SlugWithLink } from './components/SlugWithLink';\r\n *\r\n * export default [\r\n * registerReactDataTableComponent({\r\n * component: SlugWithLink,\r\n * tableId: 'product-list',\r\n * columnId: 'slug',\r\n * props: {\r\n * foo: 'bar',\r\n * },\r\n * }),\r\n * ];\r\n * ```\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport function registerReactDataTableComponent(config: ReactDataTableComponentConfig) {\r\n return {\r\n provide: APP_INITIALIZER,\r\n multi: true,\r\n useFactory: (dataTableCustomComponentService: DataTableCustomComponentService) => () => {\r\n dataTableCustomComponentService.registerCustomComponent({\r\n ...config,\r\n component: ReactCustomColumnComponent,\r\n providers: [\r\n {\r\n provide: REACT_CUSTOM_COLUMN_COMPONENT_OPTIONS,\r\n useValue: {\r\n component: config.component,\r\n props: config.props,\r\n },\r\n },\r\n ],\r\n });\r\n },\r\n deps: [DataTableCustomComponentService],\r\n };\r\n}\r\n","import { APP_INITIALIZER, FactoryProvider } from '@angular/core';\r\nimport { ComponentRegistryService } from '@vendure/admin-ui/core';\r\nimport { ElementType } from 'react';\r\nimport {\r\n REACT_INPUT_COMPONENT_OPTIONS,\r\n ReactFormInputComponent,\r\n} from './components/react-form-input.component';\r\n\r\n/**\r\n * @description\r\n * Registers a React component to be used as a {@link FormInputComponent}.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport function registerReactFormInputComponent(id: string, component: ElementType): FactoryProvider {\r\n return {\r\n provide: APP_INITIALIZER,\r\n multi: true,\r\n useFactory: (registry: ComponentRegistryService) => () => {\r\n registry.registerInputComponent(id, ReactFormInputComponent, [\r\n {\r\n provide: REACT_INPUT_COMPONENT_OPTIONS,\r\n useValue: {\r\n component,\r\n },\r\n },\r\n ]);\r\n },\r\n deps: [ComponentRegistryService],\r\n };\r\n}\r\n","import { Route } from '@angular/router';\r\nimport { ResultOf, TypedDocumentNode } from '@graphql-typed-document-node/core';\r\nimport { registerRouteComponent, RegisterRouteComponentOptions } from '@vendure/admin-ui/core';\r\nimport { DocumentNode } from 'graphql/index';\r\nimport { ElementType } from 'react';\r\nimport { REACT_ROUTE_COMPONENT_OPTIONS, ReactRouteComponent } from './components/react-route.component';\r\nimport { ReactRouteComponentOptions } from './types';\r\n\r\n/**\r\n * @description\r\n * Configuration for a React-based route component.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\ntype RegisterReactRouteComponentOptions<\r\n Entity extends { id: string; updatedAt?: string },\r\n T extends DocumentNode | TypedDocumentNode<any, { id: string }>,\r\n Field extends keyof ResultOf<T>,\r\n R extends Field,\r\n> = RegisterRouteComponentOptions<ElementType, Entity, T, Field, R> & {\r\n props?: Record<string, any>;\r\n};\r\n\r\n/**\r\n * @description\r\n * Registers a React component to be used as a route component.\r\n *\r\n * @docsCategory react-extensions\r\n */\r\nexport function registerReactRouteComponent<\r\n Entity extends { id: string; updatedAt?: string },\r\n T extends DocumentNode | TypedDocumentNode<any, { id: string }>,\r\n Field extends keyof ResultOf<T>,\r\n R extends Field,\r\n>(options: RegisterReactRouteComponentOptions<Entity, T, Field, R>): Route {\r\n const routeDef = registerRouteComponent(options);\r\n return {\r\n ...routeDef,\r\n providers: [\r\n {\r\n provide: REACT_ROUTE_COMPONENT_OPTIONS,\r\n useValue: {\r\n props: options.props,\r\n } satisfies ReactRouteComponentOptions,\r\n },\r\n ...(routeDef.providers ?? []),\r\n ],\r\n component: ReactRouteComponent,\r\n };\r\n}\r\n","// This file was generated by the build-public-api.ts script\nexport * from './components/react-custom-column.component';\nexport * from './components/react-custom-detail.component';\nexport * from './components/react-form-input.component';\nexport * from './components/react-route.component';\nexport * from './directives/react-component-host.directive';\nexport * from './react-components/ActionBar';\nexport * from './react-components/Card';\nexport * from './react-components/CdsIcon';\nexport * from './react-components/FormField';\nexport * from './react-components/Link';\nexport * from './react-components/PageBlock';\nexport * from './react-components/PageDetailLayout';\nexport * from './react-hooks/use-detail-component-data';\nexport * from './react-hooks/use-form-control';\nexport * from './react-hooks/use-injector';\nexport * from './react-hooks/use-page-metadata';\nexport * from './react-hooks/use-query';\nexport * from './react-hooks/use-route-params';\nexport * from './register-react-custom-detail-component';\nexport * from './register-react-data-table-component';\nexport * from './register-react-form-input-component';\nexport * from './register-react-route-component';\nexport * from './types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAMa,sBAAsB,GAAG,aAAa,CAAqC,IAAI,EAAE;AAE9F;;AAEG;MAKU,2BAA2B,CAAA;AAOpC,IAAA,WAAA,CACY,IAAgB,EAChB,QAAkB,EACN,mBAAyC,EAAA;QAFrD,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAChB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QACN,IAAmB,CAAA,mB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,13 +1107,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImpor
|
|
|
1107
1107
|
args: [{ selector: 'vdr-global-settings', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"global-settings-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n *vdrIfPermissions=\"updatePermission\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-block>\r\n <vdr-card>\r\n <div class=\"form-grid\">\r\n <vdr-form-field\r\n [label]=\"'common.available-languages' | translate\"\r\n for=\"availableLanguages\"\r\n [tooltip]=\"'settings.global-available-languages-tooltip' | translate\"\r\n >\r\n <vdr-language-code-selector\r\n formControlName=\"availableLanguages\"\r\n [languageCodes]=\"languageCodes\"\r\n ></vdr-language-code-selector>\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"'settings.global-out-of-stock-threshold' | translate\"\r\n for=\"outOfStockThreshold\"\r\n [tooltip]=\"'settings.global-out-of-stock-threshold-tooltip' | translate\"\r\n >\r\n <input\r\n id=\"outOfStockThreshold\"\r\n type=\"number\"\r\n formControlName=\"outOfStockThreshold\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"'settings.track-inventory-default' | translate\"\r\n for=\"enabled\"\r\n [tooltip]=\"'catalog.track-inventory-tooltip' | translate\"\r\n >\r\n <clr-toggle-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrToggle\r\n name=\"enabled\"\r\n formControlName=\"trackInventory\"\r\n [vdrDisabled]=\"!(updatePermission | hasPermission)\"\r\n />\r\n </clr-toggle-wrapper>\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card\r\n formGroupName=\"customFields\"\r\n *ngIf=\"customFields.length\"\r\n [title]=\"'common.custom-fields' | translate\"\r\n >\r\n <vdr-tabbed-custom-fields\r\n entityName=\"GlobalSettings\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n ></vdr-tabbed-custom-fields>\r\n </vdr-card>\r\n\r\n <vdr-custom-detail-component-host\r\n locationId=\"global-settings-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n </vdr-page-block>\r\n</form>\r\n", styles: ["::ng-deep ng-select .ng-value>span{margin:0!important}::ng-deep ng-select .ng-arrow-wrapper .ng-arrow{margin:0!important}::ng-deep ng-select .ng-select-container>span{margin:0!important}\n"] }]
|
|
1108
1108
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.DataService }, { type: i2$1.FormBuilder }, { type: i1.NotificationService }]; } });
|
|
1109
1109
|
|
|
1110
|
-
const GET_PAYMENT_METHOD_DETAIL = gql `
|
|
1111
|
-
query GetPaymentMethodDetail($id: ID!) {
|
|
1112
|
-
paymentMethod(id: $id) {
|
|
1113
|
-
...PaymentMethod
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
${PAYMENT_METHOD_FRAGMENT}
|
|
1110
|
+
const GET_PAYMENT_METHOD_DETAIL = gql `
|
|
1111
|
+
query GetPaymentMethodDetail($id: ID!) {
|
|
1112
|
+
paymentMethod(id: $id) {
|
|
1113
|
+
...PaymentMethod
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
${PAYMENT_METHOD_FRAGMENT}
|
|
1117
1117
|
`;
|
|
1118
1118
|
class PaymentMethodDetailComponent extends TypedBaseDetailComponent {
|
|
1119
1119
|
constructor(changeDetector, dataService, formBuilder, notificationService) {
|
|
@@ -3443,7 +3443,7 @@ const createRoutes = (pageService) => [
|
|
|
3443
3443
|
path: 'channels/:id',
|
|
3444
3444
|
component: PageComponent,
|
|
3445
3445
|
data: {
|
|
3446
|
-
locationId: 'channel-
|
|
3446
|
+
locationId: 'channel-detail',
|
|
3447
3447
|
breadcrumb: { label: marker('breadcrumb.channels'), link: ['../', 'channels'] },
|
|
3448
3448
|
},
|
|
3449
3449
|
children: pageService.getPageTabRoutes('channel-detail'),
|
|
@@ -3461,7 +3461,7 @@ const createRoutes = (pageService) => [
|
|
|
3461
3461
|
path: 'stock-locations/:id',
|
|
3462
3462
|
component: PageComponent,
|
|
3463
3463
|
data: {
|
|
3464
|
-
locationId: 'stock-location-
|
|
3464
|
+
locationId: 'stock-location-detail',
|
|
3465
3465
|
breadcrumb: { label: marker('breadcrumb.stock-locations'), link: ['../', 'stock-locations'] },
|
|
3466
3466
|
},
|
|
3467
3467
|
children: pageService.getPageTabRoutes('stock-location-detail'),
|
|
@@ -3479,7 +3479,7 @@ const createRoutes = (pageService) => [
|
|
|
3479
3479
|
path: 'sellers/:id',
|
|
3480
3480
|
component: PageComponent,
|
|
3481
3481
|
data: {
|
|
3482
|
-
locationId: 'seller-
|
|
3482
|
+
locationId: 'seller-detail',
|
|
3483
3483
|
breadcrumb: { label: marker('breadcrumb.sellers'), link: ['../', 'sellers'] },
|
|
3484
3484
|
},
|
|
3485
3485
|
children: pageService.getPageTabRoutes('seller-detail'),
|