@vendure/admin-ui 2.1.6 → 2.2.0-next.1
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/catalog/catalog.module.d.ts +4 -3
- package/catalog/components/create-facet-value-dialog/create-facet-value-dialog.component.d.ts +19 -0
- package/catalog/components/facet-detail/facet-detail.component.d.ts +9 -12
- package/catalog/components/product-variant-list/product-variant-list.component.d.ts +2 -2
- package/catalog/public_api.d.ts +1 -0
- package/core/common/generated-types.d.ts +104 -43
- package/core/common/utilities/interpolate-description.d.ts +1 -1
- package/core/common/version.d.ts +1 -1
- package/core/components/app-shell/app-shell.component.d.ts +1 -0
- package/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.d.ts +9 -3
- package/core/core.module.d.ts +1 -1
- package/core/providers/currency/currency.service.d.ts +10 -0
- package/core/providers/i18n/i18n.service.d.ts +6 -0
- package/core/public_api.d.ts +1 -0
- package/core/shared/components/chart/chart.component.d.ts +3 -0
- package/core/shared/components/chart/tooltip-plugin.d.ts +16 -1
- package/core/shared/components/configurable-input/configurable-input.component.d.ts +3 -0
- package/core/shared/components/currency-input/currency-input.component.d.ts +6 -3
- package/core/shared/pipes/locale-currency.pipe.d.ts +5 -2
- package/esm2022/catalog/catalog.module.mjs +17 -3
- package/esm2022/catalog/components/create-facet-value-dialog/create-facet-value-dialog.component.mjs +44 -0
- package/esm2022/catalog/components/facet-detail/facet-detail.component.mjs +85 -120
- package/esm2022/catalog/components/facet-list/facet-list.component.mjs +5 -2
- package/esm2022/catalog/components/product-list/product-list.component.mjs +26 -14
- package/esm2022/catalog/components/product-variant-list/product-variant-list.component.mjs +36 -15
- package/esm2022/catalog/components/variant-price-detail/variant-price-detail.component.mjs +1 -1
- package/esm2022/catalog/public_api.mjs +2 -1
- package/esm2022/core/common/generated-types.mjs +5 -5
- package/esm2022/core/common/utilities/interpolate-description.mjs +3 -3
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/components/app-shell/app-shell.component.mjs +15 -10
- package/esm2022/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.mjs +42 -273
- package/esm2022/core/core.module.mjs +13 -5
- package/esm2022/core/data/definitions/facet-definitions.mjs +2 -2
- package/esm2022/core/data/definitions/settings-definitions.mjs +2 -1
- package/esm2022/core/providers/currency/currency.service.mjs +21 -0
- package/esm2022/core/providers/i18n/i18n.service.mjs +11 -1
- package/esm2022/core/providers/localization/localization.service.mjs +4 -4
- package/esm2022/core/public_api.mjs +2 -1
- package/esm2022/core/shared/components/chart/chart.component.mjs +12 -5
- package/esm2022/core/shared/components/chart/tooltip-plugin.mjs +6 -14
- package/esm2022/core/shared/components/configurable-input/configurable-input.component.mjs +15 -13
- package/esm2022/core/shared/components/currency-input/currency-input.component.mjs +17 -14
- package/esm2022/core/shared/pipes/locale-currency.pipe.mjs +11 -7
- package/esm2022/dashboard/widgets/order-summary-widget/order-summary-widget.component.mjs +4 -4
- package/esm2022/react/react-hooks/use-query.mjs +61 -1
- package/fesm2022/vendure-admin-ui-catalog.mjs +197 -148
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +130 -317
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-dashboard.mjs +3 -3
- package/fesm2022/vendure-admin-ui-dashboard.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-react.mjs +61 -1
- package/fesm2022/vendure-admin-ui-react.mjs.map +1 -1
- package/package.json +14 -14
- package/react/react-hooks/use-query.d.ts +59 -0
- package/settings/components/administrator-list/administrator-list.component.d.ts +2 -0
- package/settings/components/stock-location-list/stock-location-list.component.d.ts +1 -1
- package/static/i18n-messages/ar.json +1 -2
- package/static/i18n-messages/cs.json +1 -2
- package/static/i18n-messages/de.json +1 -2
- package/static/i18n-messages/en.json +1 -2
- package/static/i18n-messages/es.json +1 -2
- package/static/i18n-messages/fa.json +3 -4
- package/static/i18n-messages/fr.json +1 -2
- package/static/i18n-messages/he.json +1 -2
- package/static/i18n-messages/hr.json +1 -2
- package/static/i18n-messages/it.json +2 -3
- package/static/i18n-messages/nb.json +795 -0
- package/static/i18n-messages/ne.json +2 -3
- package/static/i18n-messages/pl.json +1 -2
- package/static/i18n-messages/pt_BR.json +1 -1
- package/static/i18n-messages/pt_PT.json +1 -2
- package/static/i18n-messages/ru.json +1 -2
- package/static/i18n-messages/uk.json +1 -2
- package/static/i18n-messages/zh_Hans.json +1 -2
- package/static/i18n-messages/zh_Hant.json +1 -2
- package/static/vendure-ui-config.json +262 -6
|
@@ -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';\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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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 query.\r\n *\r\n * @example\r\n * ```ts\r\n * import { useLazyQuery } 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 * type ProductResponse = {\r\n * product: {\r\n * name: string\r\n * description: string\r\n * }\r\n * }\r\n *\r\n * export const MyComponent = () => {\r\n * const [getProduct, { data, loading, error }] = useLazyQuery<ProductResponse>(GET_PRODUCT);\r\n *\r\n * const handleClick = () => {\r\n * getProduct({\r\n * id: '1',\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}>Get product</button>\r\n * {data && (\r\n * <div>\r\n * <h1>{data.product.name}</h1>\r\n * <p>{data.product.description}</p>\r\n * </div>)}\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n *\r\n * @since 2.2.0\r\n * @docsCategory react-hooks\r\n */\r\nexport function useLazyQuery<T, V extends Record<string, any> = Record<string, any>>(\r\n query: DocumentNode | TypedDocumentNode<T, 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 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\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,QA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@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/admin-ui",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@angular/animations": "^16.2.2",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@ng-select/ng-select": "^11.1.1",
|
|
24
24
|
"@ngx-translate/core": "^15.0.0",
|
|
25
25
|
"@ngx-translate/http-loader": "^8.0.0",
|
|
26
|
-
"@vendure/common": "
|
|
26
|
+
"@vendure/common": "2.2.0-next.1",
|
|
27
27
|
"@webcomponents/custom-elements": "^1.6.0",
|
|
28
28
|
"apollo-angular": "^5.0.0",
|
|
29
29
|
"apollo-upload-client": "^17.0.0",
|
|
@@ -83,18 +83,18 @@
|
|
|
83
83
|
"esm": "./esm2022/dashboard/vendure-admin-ui-dashboard.mjs",
|
|
84
84
|
"default": "./fesm2022/vendure-admin-ui-dashboard.mjs"
|
|
85
85
|
},
|
|
86
|
-
"./login": {
|
|
87
|
-
"types": "./login/index.d.ts",
|
|
88
|
-
"esm2022": "./esm2022/login/vendure-admin-ui-login.mjs",
|
|
89
|
-
"esm": "./esm2022/login/vendure-admin-ui-login.mjs",
|
|
90
|
-
"default": "./fesm2022/vendure-admin-ui-login.mjs"
|
|
91
|
-
},
|
|
92
86
|
"./customer": {
|
|
93
87
|
"types": "./customer/index.d.ts",
|
|
94
88
|
"esm2022": "./esm2022/customer/vendure-admin-ui-customer.mjs",
|
|
95
89
|
"esm": "./esm2022/customer/vendure-admin-ui-customer.mjs",
|
|
96
90
|
"default": "./fesm2022/vendure-admin-ui-customer.mjs"
|
|
97
91
|
},
|
|
92
|
+
"./login": {
|
|
93
|
+
"types": "./login/index.d.ts",
|
|
94
|
+
"esm2022": "./esm2022/login/vendure-admin-ui-login.mjs",
|
|
95
|
+
"esm": "./esm2022/login/vendure-admin-ui-login.mjs",
|
|
96
|
+
"default": "./fesm2022/vendure-admin-ui-login.mjs"
|
|
97
|
+
},
|
|
98
98
|
"./marketing": {
|
|
99
99
|
"types": "./marketing/index.d.ts",
|
|
100
100
|
"esm2022": "./esm2022/marketing/vendure-admin-ui-marketing.mjs",
|
|
@@ -113,17 +113,17 @@
|
|
|
113
113
|
"esm": "./esm2022/react/vendure-admin-ui-react.mjs",
|
|
114
114
|
"default": "./fesm2022/vendure-admin-ui-react.mjs"
|
|
115
115
|
},
|
|
116
|
-
"./settings": {
|
|
117
|
-
"types": "./settings/index.d.ts",
|
|
118
|
-
"esm2022": "./esm2022/settings/vendure-admin-ui-settings.mjs",
|
|
119
|
-
"esm": "./esm2022/settings/vendure-admin-ui-settings.mjs",
|
|
120
|
-
"default": "./fesm2022/vendure-admin-ui-settings.mjs"
|
|
121
|
-
},
|
|
122
116
|
"./system": {
|
|
123
117
|
"types": "./system/index.d.ts",
|
|
124
118
|
"esm2022": "./esm2022/system/vendure-admin-ui-system.mjs",
|
|
125
119
|
"esm": "./esm2022/system/vendure-admin-ui-system.mjs",
|
|
126
120
|
"default": "./fesm2022/vendure-admin-ui-system.mjs"
|
|
121
|
+
},
|
|
122
|
+
"./settings": {
|
|
123
|
+
"types": "./settings/index.d.ts",
|
|
124
|
+
"esm2022": "./esm2022/settings/vendure-admin-ui-settings.mjs",
|
|
125
|
+
"esm": "./esm2022/settings/vendure-admin-ui-settings.mjs",
|
|
126
|
+
"default": "./fesm2022/vendure-admin-ui-settings.mjs"
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
"sideEffects": false
|
|
@@ -42,6 +42,65 @@ export declare function useQuery<T, V extends Record<string, any> = Record<strin
|
|
|
42
42
|
readonly error: string | undefined;
|
|
43
43
|
readonly refetch: (variables?: V) => Promise<T>;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* @description
|
|
47
|
+
* A React hook which allows you to execute a GraphQL query.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* import { useLazyQuery } from '\@vendure/admin-ui/react';
|
|
52
|
+
* import { gql } from 'graphql-tag';
|
|
53
|
+
*
|
|
54
|
+
* const GET_PRODUCT = gql`
|
|
55
|
+
* query GetProduct($id: ID!) {
|
|
56
|
+
* product(id: $id) {
|
|
57
|
+
* id
|
|
58
|
+
* name
|
|
59
|
+
* description
|
|
60
|
+
* }
|
|
61
|
+
* }`;
|
|
62
|
+
* type ProductResponse = {
|
|
63
|
+
* product: {
|
|
64
|
+
* name: string
|
|
65
|
+
* description: string
|
|
66
|
+
* }
|
|
67
|
+
* }
|
|
68
|
+
*
|
|
69
|
+
* export const MyComponent = () => {
|
|
70
|
+
* const [getProduct, { data, loading, error }] = useLazyQuery<ProductResponse>(GET_PRODUCT);
|
|
71
|
+
*
|
|
72
|
+
* const handleClick = () => {
|
|
73
|
+
* getProduct({
|
|
74
|
+
* id: '1',
|
|
75
|
+
* }).then(result => {
|
|
76
|
+
* // do something with the result
|
|
77
|
+
* });
|
|
78
|
+
* };
|
|
79
|
+
*
|
|
80
|
+
* if (loading) return <div>Loading...</div>;
|
|
81
|
+
* if (error) return <div>Error! { error }</div>;
|
|
82
|
+
*
|
|
83
|
+
* return (
|
|
84
|
+
* <div>
|
|
85
|
+
* <button onClick={handleClick}>Get product</button>
|
|
86
|
+
* {data && (
|
|
87
|
+
* <div>
|
|
88
|
+
* <h1>{data.product.name}</h1>
|
|
89
|
+
* <p>{data.product.description}</p>
|
|
90
|
+
* </div>)}
|
|
91
|
+
* </div>
|
|
92
|
+
* );
|
|
93
|
+
* };
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @since 2.2.0
|
|
97
|
+
* @docsCategory react-hooks
|
|
98
|
+
*/
|
|
99
|
+
export declare function useLazyQuery<T, V extends Record<string, any> = Record<string, any>>(query: DocumentNode | TypedDocumentNode<T, V>): [(variables?: V) => Promise<T>, {
|
|
100
|
+
data: T | undefined;
|
|
101
|
+
loading: boolean;
|
|
102
|
+
error: string | undefined;
|
|
103
|
+
}];
|
|
45
104
|
/**
|
|
46
105
|
* @description
|
|
47
106
|
* A React hook which allows you to execute a GraphQL mutation.
|
|
@@ -11,6 +11,8 @@ export declare class AdministratorListComponent extends TypedBaseListComponent<t
|
|
|
11
11
|
skip: number;
|
|
12
12
|
take: number;
|
|
13
13
|
filter: {
|
|
14
|
+
_and?: import("@vendure/admin-ui/core").InputMaybe<import("@vendure/admin-ui/core").AdministratorFilterParameter[]> | undefined;
|
|
15
|
+
_or?: import("@vendure/admin-ui/core").InputMaybe<import("@vendure/admin-ui/core").AdministratorFilterParameter[]> | undefined;
|
|
14
16
|
createdAt?: import("@vendure/admin-ui/core").InputMaybe<import("@vendure/admin-ui/core").DateOperators> | undefined;
|
|
15
17
|
emailAddress?: import("@vendure/admin-ui/core").InputMaybe<import("@vendure/admin-ui/core").StringOperators> | undefined;
|
|
16
18
|
firstName?: import("@vendure/admin-ui/core").InputMaybe<import("@vendure/admin-ui/core").StringOperators> | undefined;
|
|
@@ -5,7 +5,7 @@ export declare const GET_STOCK_LOCATION_LIST: import("apollo-angular").TypedDocu
|
|
|
5
5
|
export declare class StockLocationListComponent extends TypedBaseListComponent<typeof GetStockLocationListDocument, 'stockLocations'> implements OnInit {
|
|
6
6
|
readonly customFields: import("@vendure/admin-ui/core").CustomFieldConfig[];
|
|
7
7
|
readonly filters: import("@vendure/admin-ui/core").DataTableFilterCollection<import("@vendure/admin-ui/core").StockLocationFilterParameter>;
|
|
8
|
-
readonly sorts: import("@vendure/admin-ui/core").DataTableSortCollection<import("@vendure/admin-ui/core").StockLocationSortParameter, ["
|
|
8
|
+
readonly sorts: import("@vendure/admin-ui/core").DataTableSortCollection<import("@vendure/admin-ui/core").StockLocationSortParameter, ["id" | "createdAt" | "updatedAt" | "name" | "description"]>;
|
|
9
9
|
constructor();
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<StockLocationListComponent, never>;
|
|
11
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<StockLocationListComponent, "vdr-stock-location-list", never, {}, {}, never, never, false, never>;
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"confirm-deletion-of-unused-variants-body": "تم إجراء متغيرات المنتج التالية قديمة بسبب إضافة خيارات جديدة. سيتم حذفها أثناء إنشاء متغيرات المنتج الجديدة.",
|
|
90
90
|
"confirm-deletion-of-unused-variants-title": "حذف متغيرات المنتجات القديمة؟",
|
|
91
91
|
"create-draft-order": "إنشاء ترتيب مسودة",
|
|
92
|
+
"create-facet-value": "إنشاء قيمة جديدة للفئة",
|
|
92
93
|
"create-new-collection": "إنشاء مجموعة جديدة",
|
|
93
94
|
"create-new-facet": "إنشاء فئة جديد",
|
|
94
95
|
"create-new-product": "منتج جديد",
|
|
@@ -105,7 +106,6 @@
|
|
|
105
106
|
"facet-values": "قيم الفئة",
|
|
106
107
|
"facets": "فئات",
|
|
107
108
|
"filter-by-name": "تصفية بالاسم",
|
|
108
|
-
"filter-by-sku": "تصفية بواسطة SKU",
|
|
109
109
|
"filter-inheritance": "طبيعة الإنتقاء",
|
|
110
110
|
"filters": "الإنتقاء",
|
|
111
111
|
"inherit-filters-from-parent": "إنتقاء موروث من الأصل",
|
|
@@ -478,7 +478,6 @@
|
|
|
478
478
|
"error": {
|
|
479
479
|
"403-forbidden": "أنت غير مخول حاليًا للوصول إلى \" {path} \". إما أنك تفتقر إلى الأذونات , أو انتهت جلستك.",
|
|
480
480
|
"could-not-connect-to-server": "لا يمكن الاتصال بخادم Vendure في {url}",
|
|
481
|
-
"facet-value-form-values-do-not-match": "عدد القيم في نموذج الفئة لا يتطابق مع العدد الفعلي للقيم",
|
|
482
481
|
"health-check-failed": "فشل فحص صحة النظام",
|
|
483
482
|
"no-default-shipping-zone-set": "هذه القناة لا تحتوي على منطقة شحن افتراضية. قد يتسبب هذا في حدوث أخطاء عند حساب رسوم الشحن.",
|
|
484
483
|
"no-default-tax-zone-set": "لا تحتوي هذه القناة على منطقة ضريبية افتراضية , والتي ستسبب أخطاء عند حساب الأسعار. يرجى إنشاء أو تحديد منطقة."
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"confirm-deletion-of-unused-variants-body": "",
|
|
90
90
|
"confirm-deletion-of-unused-variants-title": "",
|
|
91
91
|
"create-draft-order": "",
|
|
92
|
+
"create-facet-value": "Vytvořit novou hodnotu atributu",
|
|
92
93
|
"create-new-collection": "Vytvořit kolekci",
|
|
93
94
|
"create-new-facet": "Vytvořit nový atribut",
|
|
94
95
|
"create-new-product": "Nový produkt",
|
|
@@ -105,7 +106,6 @@
|
|
|
105
106
|
"facet-values": "Hodnoty atributů",
|
|
106
107
|
"facets": "",
|
|
107
108
|
"filter-by-name": "Filtrovat dle jména",
|
|
108
|
-
"filter-by-sku": "",
|
|
109
109
|
"filter-inheritance": "",
|
|
110
110
|
"filters": "Filtry",
|
|
111
111
|
"inherit-filters-from-parent": "",
|
|
@@ -478,7 +478,6 @@
|
|
|
478
478
|
"error": {
|
|
479
479
|
"403-forbidden": "Neautorizovaný přístup k \"{ path }\". Buďto nemáte oprávnění, nebo Vaše relace vypršela.",
|
|
480
480
|
"could-not-connect-to-server": "Nelze se připojit k Vendure serveru na { url }",
|
|
481
|
-
"facet-value-form-values-do-not-match": "Počet hodnot ve formuláři atributu nesouhlasí k aktuálním počtem hodnot",
|
|
482
481
|
"health-check-failed": "Kontrala stavu systému selhala",
|
|
483
482
|
"no-default-shipping-zone-set": "Tento kanál nemá výchozí dodací zónu. To může způsobovat chyby při výpočtu poštovného.",
|
|
484
483
|
"no-default-tax-zone-set": "Tento kanál nemá výchozí daňovou zónu, to může způsobovat chyby při výpočtu cen. Prosím vytvořte, nebo vyberte zónu."
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"confirm-deletion-of-unused-variants-body": "Die folgenden Produktvarianten sind durch die Ergänzung neuer Optionen überflüssig geworden. Sie werden bei der Erstellung der neuen Produktvarianten gelöscht.",
|
|
90
90
|
"confirm-deletion-of-unused-variants-title": "Überflüssige Produktvarianten löschen?",
|
|
91
91
|
"create-draft-order": "Neue Bestellung",
|
|
92
|
+
"create-facet-value": "Neuen Facettenwert erstellen",
|
|
92
93
|
"create-new-collection": "Neue Sammlung anlegen",
|
|
93
94
|
"create-new-facet": "Neue Facette erstellen",
|
|
94
95
|
"create-new-product": "Neues Produkt",
|
|
@@ -105,7 +106,6 @@
|
|
|
105
106
|
"facet-values": "Facettenwerte",
|
|
106
107
|
"facets": "Facetten",
|
|
107
108
|
"filter-by-name": "Nach Name filtern",
|
|
108
|
-
"filter-by-sku": "Nach Artikelnummer filtern",
|
|
109
109
|
"filter-inheritance": "Filter Vererbung",
|
|
110
110
|
"filters": "Filter",
|
|
111
111
|
"inherit-filters-from-parent": "Erbe Filter vom Elternteil",
|
|
@@ -478,7 +478,6 @@
|
|
|
478
478
|
"error": {
|
|
479
479
|
"403-forbidden": "Sie sind derzeit nicht berechtigt, auf \"{ path }\" zuzugreifen. Entweder fehlen Ihnen die Berechtigungen, oder Ihre Sitzung ist abgelaufen.",
|
|
480
480
|
"could-not-connect-to-server": "Es konnte keine Verbindung zum Vendure-Server auf { url } hergestellt werden.",
|
|
481
|
-
"facet-value-form-values-do-not-match": "Die Anzahl der Werte im Facetten-Formular stimmt nicht mit der tatsächlichen Anzahl der Werte überein",
|
|
482
481
|
"health-check-failed": "Systemzustandsprüfung fehlgeschlagen",
|
|
483
482
|
"no-default-shipping-zone-set": "Dieser Kanal verfügt nicht über eine Standard-Versandzone. Dies kann zu Fehlern bei der Berechnung der Auftragsversandkosten führen.",
|
|
484
483
|
"no-default-tax-zone-set": "Dieser Kanal verfügt nicht über eine Standard-Steuerzone, was zu Fehlern bei der Preisberechnung führen kann. Bitte erstellen oder wählen Sie eine Zone."
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"confirm-deletion-of-unused-variants-body": "The following product variants have been made obsolete due to the addition of new options. They will be deleted during the creation of the new product variants.",
|
|
90
90
|
"confirm-deletion-of-unused-variants-title": "Delete obsolete product variants?",
|
|
91
91
|
"create-draft-order": "Create draft order",
|
|
92
|
+
"create-facet-value": "Create new facet value",
|
|
92
93
|
"create-new-collection": "Create new collection",
|
|
93
94
|
"create-new-facet": "Create new facet",
|
|
94
95
|
"create-new-product": "New product",
|
|
@@ -105,7 +106,6 @@
|
|
|
105
106
|
"facet-values": "Facet values",
|
|
106
107
|
"facets": "Facets",
|
|
107
108
|
"filter-by-name": "Filter by name",
|
|
108
|
-
"filter-by-sku": "Filter by SKU",
|
|
109
109
|
"filter-inheritance": "Filter inheritance",
|
|
110
110
|
"filters": "Filters",
|
|
111
111
|
"inherit-filters-from-parent": "Inherit filters from parent",
|
|
@@ -478,7 +478,6 @@
|
|
|
478
478
|
"error": {
|
|
479
479
|
"403-forbidden": "You are not currently authorized to access \"{ path }\". Either you lack permissions, or your session has expired.",
|
|
480
480
|
"could-not-connect-to-server": "Could not connect to the Vendure server at { url }",
|
|
481
|
-
"facet-value-form-values-do-not-match": "The number of values in the facet form does not match the actual number of values",
|
|
482
481
|
"health-check-failed": "System health check failed",
|
|
483
482
|
"no-default-shipping-zone-set": "This channel has no default shipping zone. This may cause errors when calculating order shipping charges.",
|
|
484
483
|
"no-default-tax-zone-set": "This channel has no default tax zone, which will cause errors when calculating prices. Please create or select a zone."
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"confirm-deletion-of-unused-variants-body": "Las siguientes variantes de producto han quedado obsoletas debido a la incorporación de nuevas opciones. Se eliminarán durante la creación de las nuevas variantes de producto.",
|
|
90
90
|
"confirm-deletion-of-unused-variants-title": "¿Eliminar variantes de producto obsoletas?",
|
|
91
91
|
"create-draft-order": "Crear borrador de una orden",
|
|
92
|
+
"create-facet-value": "Crear nuevo valor de faceta",
|
|
92
93
|
"create-new-collection": "Crear nueva colección",
|
|
93
94
|
"create-new-facet": "Crear nueva faceta",
|
|
94
95
|
"create-new-product": "Crear nuevo producto",
|
|
@@ -105,7 +106,6 @@
|
|
|
105
106
|
"facet-values": "Valores de faceta",
|
|
106
107
|
"facets": "Facets",
|
|
107
108
|
"filter-by-name": "Filtrar por nombre",
|
|
108
|
-
"filter-by-sku": "Filtrar por código de referencia",
|
|
109
109
|
"filter-inheritance": "Herencia de filtros",
|
|
110
110
|
"filters": "Filtros",
|
|
111
111
|
"inherit-filters-from-parent": "Heredar filtros del nivel superior",
|
|
@@ -478,7 +478,6 @@
|
|
|
478
478
|
"error": {
|
|
479
479
|
"403-forbidden": "Actualmente no está autorizado para acceder a \"{ path }\". O bien carece de permisos, o su sesión ha expirado.",
|
|
480
480
|
"could-not-connect-to-server": "No se ha podido conectar con el servidor de vendure en { url }",
|
|
481
|
-
"facet-value-form-values-do-not-match": "El número de valores en el formulario de la faceta no coincide con el número real de valores",
|
|
482
481
|
"health-check-failed": "El sistema de control de integridad falló",
|
|
483
482
|
"no-default-shipping-zone-set": "Este canal no tiene una zona de envío por defecto. Esto puede causar errores al calcular los gastos de envío del pedido.",
|
|
484
483
|
"no-default-tax-zone-set": "Este canal no tiene una zona fiscal por defecto, lo que provocará errores al calcular los precios. Por favor, cree o seleccione una zona."
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"confirm-deletion-of-unused-variants-body": "انواع محصولات زیر به دلیل اضافه شدن قابلیت های جدید منسوخ شده اند. آنها در طول ایجاد انواع محصول جدید حذف خواهند شد.",
|
|
90
90
|
"confirm-deletion-of-unused-variants-title": "آبا انواع محصولات منسوخ شده حذف شوند ؟",
|
|
91
91
|
"create-draft-order": "ایجاد پیش نویس سفارش",
|
|
92
|
+
"create-facet-value": "ایجاد مقدار جدید برای ویژگی",
|
|
92
93
|
"create-new-collection": "ایحاد مجموعه جدید",
|
|
93
94
|
"create-new-facet": "ایحاد ویژگی جدید",
|
|
94
95
|
"create-new-product": "ایجاد محصول جدید",
|
|
@@ -105,7 +106,6 @@
|
|
|
105
106
|
"facet-values": "مقادیر ویژگی ها",
|
|
106
107
|
"facets": "ویژگی ها",
|
|
107
108
|
"filter-by-name": "فیلتر براساس نام",
|
|
108
|
-
"filter-by-sku": "فیلتر براساس شناسه انحصاری محصول",
|
|
109
109
|
"filter-inheritance": "فیلتر براساس وراثت",
|
|
110
110
|
"filters": "فیلترها",
|
|
111
111
|
"inherit-filters-from-parent": "به ارث بردن فیلترها از والد",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"stock-levels": "سطح انبار",
|
|
175
175
|
"stock-location": "انبار",
|
|
176
176
|
"stock-locations": "انبارها",
|
|
177
|
-
"stock-on-hand": "انبار",
|
|
177
|
+
"stock-on-hand": "موجودی انبار",
|
|
178
178
|
"tax-category": "دسته بندی مالیاتی",
|
|
179
179
|
"taxes": "مالیات ها",
|
|
180
180
|
"track-inventory": "فروش براساس موجودی انبار",
|
|
@@ -478,7 +478,6 @@
|
|
|
478
478
|
"error": {
|
|
479
479
|
"403-forbidden": "شما در حال حاضر مجاز به دسترسی به \"{ path }\" نیستید. یا فاقد مجوز هستید یا جلسه شما منقضی شده است.",
|
|
480
480
|
"could-not-connect-to-server": "اتصال به سرور امکان پذیر نیست",
|
|
481
|
-
"facet-value-form-values-do-not-match": "تعداد مقادیر در فرم ویژگی ها با تعداد واقعی مقادیر مطابقت ندارد",
|
|
482
481
|
"health-check-failed": "بررسی سلامت سیستم ناموفق بود",
|
|
483
482
|
"no-default-shipping-zone-set": "این کانال منطقه حمل و نقل پیش فرض ندارد. این ممکن است باعث ایجاد خطا در محاسبه هزینه ارسال سفارش شود.",
|
|
484
483
|
"no-default-tax-zone-set": "این کانال فاقد منطقه مالیاتی پیش فرض است که باعث خطا در محاسبه قیمت ها می شود. لطفا یک منطقه ایجاد یا انتخاب کنید."
|
|
@@ -792,4 +791,4 @@
|
|
|
792
791
|
"job-state-pending": "در انتظار",
|
|
793
792
|
"job-state-running": "در حال اجرا"
|
|
794
793
|
}
|
|
795
|
-
}
|
|
794
|
+
}
|