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AAA,mBAAkB,CACf5M,QAAST,EAAMS,QACfF,GAAIP,EAAMO,GACVC,SAAUR,EAAMQ,SAChBxB,KAAM,GACNsO,YAAaC,EAAAA,qBAAqBM,KAClCJ,WAAYzN,EAAM0N,cAEjB1N,EAAMjE,UAAU8S,6BAErBlR,IAAAA,cAAC0P,EAAAA,mBAAkB,CACf5M,QAAST,EAAMS,QACfF,GAAIP,EAAMO,GACVC,SAAUR,EAAMQ,SAChBxB,KAAM,GACNsO,YAAaC,EAAAA,qBAAqBC,KAClCC,WAAW,GAEVzN,EAAMjE,UAAU+S,6BAErBnR,IAAAA,cAAC0P,EAAAA,mBAAkB,CACf5M,QAAST,EAAMS,QACfF,GAAIP,EAAMO,GACVC,SAAUR,EAAMQ,SAChBxB,KAAM,GACNsO,YAAaC,EAAAA,qBAAqBC,KAClCC,WAAW,KAGI,QADAa,EACtBtO,EAAMhB,KAAKoB,mBAAW,IAAAkO,OAAA,EAAtBA,EAAwBzP,KAAI,CAACzD,EAAwBmE,IAE9C5B,IAAAA,cAACoR,EAAAA,kBAAiB,CAACtO,QAAST,EAAMS,QAASF,GAAIP,EAAMO,GAAIC,SAAUR,EAAMQ,SAAUxB,KAAM,GAAID,IAAK,OAAOQ,KACpGyL,EAA6BhL,EAAOT,EAAOnE","sources":["webpack://Msdyn365.Commerce.Online/./src/common/expand-button-state.ts?0e6f","webpack://Msdyn365.Commerce.Online/./src/common/sales-line-state.ts?3828","webpack://Msdyn365.Commerce.Online/./src/modules/order-history-with-search-and-filters/common/get-sales-order.ts?e014","webpack://Msdyn365.Commerce.Online/./src/modules/order-history-with-search-and-filters/components/order-history-with-search-and-filters-order-list.component.tsx?9f7d","webpack://Msdyn365.Commerce.Online/./src/modules/order-history-with-search-and-filters/components/order-history-with-search-and-filters-view-mode-selector.component.tsx?6452","webpack://Msdyn365.Commerce.Online/./src/modules/order-history-with-search-and-filters/components/order-history-with-search-and-filters-organization-wide-selector.component.tsx?b9a7","webpack://Msdyn365.Commerce.Online/./src/modules/order-history-with-search-and-filters/components/order-history-with-search-and-filters-header.component.tsx?3609","webpack://Msdyn365.Commerce.Online/./src/modules/order-history-with-search-and-filters/components/order-history-with-search-and-filters-order-table.component.tsx?c86f"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { observable } from 'mobx';\n\n/**\n * Represents state of the expand button.\n */\nexport class ExpandButtonState {\n    @observable public extraProductsCount: number;\n\n    public constructor(extraProductsCount: number) {\n        this.extraProductsCount = extraProductsCount;\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { observable } from 'mobx';\n\n/**\n * Represents state of the sales line product.\n */\nexport class SalesLineState {\n    @observable public isHidden?: boolean;\n\n    public stateId: string;\n\n    public constructor(stateId: string, isHidden?: boolean) {\n        this.stateId = stateId;\n        this.isHidden = isHidden;\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext, getUrlSync } from '@msdyn365-commerce/core-internal';\nimport { SalesOrder, SalesStatus } from '@msdyn365-commerce/retail-proxy';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Resources for order status.\n */\nexport interface IOrderHistoryWithSearchAndFiltersOrderStatusResources {\n    orderStatusCreated: string;\n    orderStatusDelivered: string;\n    orderStatusInvoiced: string;\n    orderStatusCanceled: string;\n}\n\n/**\n * Retrieves the url for order details page.\n * @param actionContext - Core action context.\n * @param salesOrder - Order information.\n * @returns Url to order details.\n */\nexport const getOrderDetailsPageUrl = (actionContext: IActionContext, salesOrder: SalesOrder): string => {\n    const orderDetailsUrl = getUrlSync('orderDetails', actionContext) || '';\n    const separator = orderDetailsUrl.includes('?') ? '&' : '?';\n    if (!StringExtensions.isNullOrWhitespace(salesOrder.SalesId)) {\n        // Redirect with sales order sales id\n        return `${orderDetailsUrl}${separator}salesId=${salesOrder.SalesId}`;\n    }\n\n    // Redirect with sales order transaction id\n    return `${orderDetailsUrl}${separator}transactionId=${salesOrder.Id}`;\n};\n\n/**\n * Retrieves the text for order status.\n * @param status - The sales order.\n * @param resources - Resources where we can find the text.\n * @returns The text for the order status.\n */\nexport const getOrderStatusLabel = (\n    status: SalesStatus | undefined,\n    resources: IOrderHistoryWithSearchAndFiltersOrderStatusResources\n): string => {\n    switch (status) {\n        case SalesStatus.Created:\n            return resources.orderStatusCreated;\n        case SalesStatus.Delivered:\n            return resources.orderStatusDelivered;\n        case SalesStatus.Invoiced:\n            return resources.orderStatusInvoiced;\n        case SalesStatus.Canceled:\n            return resources.orderStatusCanceled;\n        default:\n            return '';\n    }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport {\n    Button,\n    format,\n    getPayloadObject,\n    getTelemetryAttributes,\n    ITelemetryContent,\n    Node,\n    TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport {\n    ChannelDeliveryOptionConfiguration,\n    ChannelIdentity,\n    Customer,\n    OrderOriginator,\n    OrgUnitLocation,\n    SalesOrder,\n    SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Observer } from 'mobx-react';\nimport React from 'react';\n\nimport classnames from 'classnames';\n\nimport { getGroups, IGroup, IGroupDelivery, IGroups } from '../../../common/get-groups';\nimport { getOrderInformation, getOrderInformationInput, IOrderInformation } from '../../../common/get-order-information';\nimport { ISalesLine } from '../../../common/get-sales-line';\nimport { getSalesLines, getSalesLinesInput, IGetSalesLinesInput } from '../../../common/get-sales-lines';\nimport { ExpandButtonState, IPriceContext, SalesLineState } from '../../../common';\nimport {\n    IOrderHistoryWithSearchAndFiltersProps,\n    IOrderHistoryWithSearchAndFiltersResources\n} from '../order-history-with-search-and-filters.props.autogenerated';\nimport { IOrderHistoryWithSearchAndFiltersData } from '../order-history-with-search-and-filters.data';\nimport { getOrderDetailsPageUrl } from '../common/get-sales-order';\n\n/**\n * Class names used in component.\n */\nconst componentClassName = 'ms-order-history-with-search-and-filters-order-list';\nconst orderListItemClassName = `${componentClassName}__sales-order`;\nconst orderInformationHeaderClassName = `${componentClassName}__sales-order__header`;\nconst expandProductsButtonClassName = `${componentClassName}__sales-order__expand-products-button`;\nconst expandProductsButtonWrapperClassName = `${componentClassName}__sales-order__expand-products-button-wrapper`;\nconst orderDetailButtonClassName = `${componentClassName}__btn-order-details`;\nconst moduleName = componentClassName;\n\n/**\n * IOrderHistoryWithSearchAndFiltersOrderListData interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersOrderListData {\n    salesOrders: SalesOrder[];\n    products: SimpleProduct[];\n    channelIdentities?: ChannelIdentity[];\n    orgUnitLocations?: OrgUnitLocation[];\n    customer?: Customer;\n    originators?: OrderOriginator[];\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersOrderListProps interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersOrderListProps extends IComponentProps<IOrderHistoryWithSearchAndFiltersOrderListData> {\n    moduleProps: IOrderHistoryWithSearchAndFiltersProps<IOrderHistoryWithSearchAndFiltersData>;\n    className?: string;\n    resources: IOrderHistoryWithSearchAndFiltersResources;\n    isMobileView?: boolean;\n    showChannelInfo: boolean;\n    showOrderPlacedBy?: boolean;\n    salesLinesLimit?: number;\n    telemetryContent?: ITelemetryContent;\n    retailMultiplePickUpOptionEnabled?: boolean;\n    channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersOrderItemProps interface.\n */\ninterface IOrderHistoryWithSearchAndFiltersOrderItemProps {\n    orderInfomation: IOrderInformation;\n    groups?: IGroups;\n    orderDetailsLink: React.ReactNode;\n    expandProductsButton?: React.ReactNode;\n}\n\n/**\n * OrderInfomation component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst OrderInfomationComponent: React.FC<IOrderInformation> = ({\n    orderInformationProps,\n    placedBy,\n    salesId,\n    receiptId,\n    channelName,\n    createdDate,\n    count,\n    amount,\n    channelReferenceId\n}) => (\n    <Node {...orderInformationProps}>\n        {placedBy}\n        <div className={orderInformationHeaderClassName}>\n            {channelName}\n            {count}\n        </div>\n        {salesId}\n        {receiptId}\n        {createdDate}\n        {amount}\n        {channelReferenceId}\n    </Node>\n);\n\n/**\n * GroupDelivery component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst GroupDeliveryComponent: React.FC<IGroupDelivery> = ({ deliveryProps, heading, count, processing, address, trackingInfo }) => (\n    <Node {...deliveryProps}>\n        {heading}\n        {count}\n        {processing}\n        {address}\n        {trackingInfo}\n    </Node>\n);\n\n/**\n * Group component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst GroupComponent: React.FC<IGroup> = ({ groupProps, delivery, salesLinesProps, salesLines }) => (\n    <Node {...groupProps}>\n        {delivery && <GroupDeliveryComponent {...delivery} />}\n        {salesLines && (\n            <Node {...salesLinesProps}>\n                {salesLines.map((salesLine: ISalesLine) => (\n                    <React.Fragment key={salesLine.data.salesLine.LineId}>{salesLine.salesLine}</React.Fragment>\n                ))}\n            </Node>\n        )}\n    </Node>\n);\n\n/**\n * Groups component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst GroupsComponent: React.FC<IGroups> = ({ groupsProps, groups }) => (\n    <Node {...groupsProps}>\n        {groups.map((group: IGroup, index: number) => (\n            <GroupComponent key={index} {...group} />\n        ))}\n    </Node>\n);\n\n/**\n * Updates product states to show all products.\n * @param expandButtonState - Expand button state.\n * @param productStates - Product states.\n * @returns Callback method.\n */\nconst onExpandProductsCallback = (expandButtonState: ExpandButtonState, productStates: SalesLineState[]) => () => {\n    for (const productState of productStates) {\n        productState.isHidden = false;\n    }\n    expandButtonState.extraProductsCount = 0;\n};\n\n/**\n * Gets the IOrderHistoryWithSearchAndFiltersOrderItem configuration.\n * @param salesOrder The sales order\n * @param index The sales order index\n * @param props The component props\n * @returns The IOrderHistoryWithSearchAndFiltersOrderItem configuration.\n */\nconst createOrderHistoryWithSearchAndFiltersOrderItemProps = (\n    salesOrder: SalesOrder,\n    index: number,\n    props: IOrderHistoryWithSearchAndFiltersOrderListProps\n): IOrderHistoryWithSearchAndFiltersOrderItemProps => {\n    const {\n        id,\n        typeName,\n        context,\n        moduleProps: { telemetry },\n        data: { products, channelIdentities, orgUnitLocations, customer, originators },\n        showChannelInfo,\n        telemetryContent,\n        resources: { freePriceText, detailsAriaLabel, detailsLabel, orderItemLabel, orderItemsLabel },\n        context: { actionContext },\n        retailMultiplePickUpOptionEnabled,\n        channelDeliveryOptionConfig\n    } = props;\n\n    const priceContext = {\n        id,\n        typeName,\n        context,\n        telemetry,\n        freePriceText\n    } as IPriceContext;\n\n    const originator: OrderOriginator | undefined = originators?.find(\n        originator =>\n            (salesOrder.SalesId && originator.SalesId === salesOrder.SalesId) ||\n            (salesOrder.Id && originator.TransactionId === salesOrder.Id)\n    );\n\n    const salesLinesInput =\n        products &&\n        getSalesLinesInput(\n            props.moduleProps,\n            moduleName,\n            salesOrder,\n            products,\n            priceContext,\n            undefined,\n            undefined,\n            undefined,\n            retailMultiplePickUpOptionEnabled,\n            channelDeliveryOptionConfig\n        );\n\n    let salesLines: ISalesLine[] | undefined;\n    let expandProductsButton: React.ReactNode;\n    if (salesLinesInput) {\n        const getSalesLinesInputProps: IGetSalesLinesInput = { ...salesLinesInput, imageOnly: true };\n        if (!ObjectExtensions.isNullOrUndefined(props.salesLinesLimit)) {\n            const extraProductsCount = getSalesLinesInputProps.salesLines.length - props.salesLinesLimit;\n            getSalesLinesInputProps.salesLineStates = getSalesLinesInputProps.salesLines.map(\n                (salesLine, index) => new SalesLineState(`${salesLine.LineId ?? ''}-${index}`, index >= props.salesLinesLimit!)\n            );\n            if (extraProductsCount > 0) {\n                const expandButtonState = new ExpandButtonState(extraProductsCount);\n                expandProductsButton = (\n                    <>\n                        <Observer>\n                            {() => {\n                                const text = format(\n                                    props.resources.orderHistoryExpandProductsButtonText,\n                                    expandButtonState.extraProductsCount\n                                );\n                                return (\n                                    expandButtonState.extraProductsCount > 0 && (\n                                        <Button\n                                            className={expandProductsButtonClassName}\n                                            title={text}\n                                            role='button'\n                                            onClick={onExpandProductsCallback(expandButtonState, getSalesLinesInputProps.salesLineStates!)}\n                                            aria-label={text}\n                                        >\n                                            {text}\n                                        </Button>\n                                    )\n                                );\n                            }}\n                        </Observer>\n                    </>\n                );\n            }\n        }\n        salesLines = getSalesLines(getSalesLinesInputProps);\n    }\n\n    expandProductsButton = (\n        <>\n            {expandProductsButton}\n            <div className={expandProductsButtonWrapperClassName} />\n        </>\n    );\n\n    const groups =\n        salesLines &&\n        getGroups({\n            moduleName,\n            salesLines,\n            resources: { orderItemLabel, orderItemsLabel },\n            retailMultiplePickUpOptionEnabled\n        });\n\n    const orderInfomationInput = getOrderInformationInput(\n        props.moduleProps,\n        moduleName,\n        salesOrder,\n        priceContext,\n        channelIdentities,\n        orgUnitLocations,\n        customer,\n        originator,\n        showChannelInfo\n    );\n\n    const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.OrderDetails);\n    const orderDetailsAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n    const orderDetailsLink = (\n        <Button\n            href={getOrderDetailsPageUrl(actionContext, salesOrder)}\n            role='button'\n            aria-label={\n                salesOrder.ChannelReferenceId && detailsAriaLabel\n                    ? detailsAriaLabel.replace('{orderId}', salesOrder.ChannelReferenceId)\n                    : ''\n            }\n            className={orderDetailButtonClassName}\n            {...orderDetailsAttributes}\n        >\n            {detailsLabel}\n        </Button>\n    );\n\n    return {\n        orderInfomation: getOrderInformation(orderInfomationInput),\n        groups: groups,\n        orderDetailsLink: orderDetailsLink,\n        expandProductsButton: expandProductsButton\n    };\n};\n\n/**\n * OrderHistoryWithSearchAndFiltersOrderList component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst OrderHistoryWithSearchAndFiltersOrderListFunctionalComponent: React.FC<IOrderHistoryWithSearchAndFiltersOrderListProps> = (\n    props: IOrderHistoryWithSearchAndFiltersOrderListProps\n) => {\n    return (\n        <Node className={classnames(props.className, componentClassName)}>\n            {ArrayExtensions.hasElements(props.data.salesOrders) &&\n                props.data.salesOrders.map((salesOrder: SalesOrder, index: number) => {\n                    const itemProps: IOrderHistoryWithSearchAndFiltersOrderItemProps = createOrderHistoryWithSearchAndFiltersOrderItemProps(\n                        salesOrder,\n                        index,\n                        props\n                    );\n                    return (\n                        <Node className={orderListItemClassName} key={salesOrder.SalesId || salesOrder.Id}>\n                            {itemProps.orderInfomation && <OrderInfomationComponent {...itemProps.orderInfomation} />}\n                            {itemProps.groups && <GroupsComponent {...itemProps.groups} />}\n                            {itemProps.expandProductsButton}\n                            {itemProps.orderDetailsLink}\n                        </Node>\n                    );\n                })}\n        </Node>\n    );\n};\n\n/**\n * OrderHistoryWithSearchAndFiltersOrderList component.\n */\nexport const OrderHistoryWithSearchAndFiltersOrderListComponent: React.FunctionComponent<IOrderHistoryWithSearchAndFiltersOrderListProps> = msdyn365Commerce.createComponent<\n    // @ts-expect-error\n    IOrderHistoryWithSearchAndFiltersOrderListProps\n>('OrderHistoryWithSearchAndFiltersOrderListComponent', { component: OrderHistoryWithSearchAndFiltersOrderListFunctionalComponent });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport {\n    Button,\n    ITelemetryContent,\n    TelemetryConstant,\n    getPayloadObject,\n    getTelemetryAttributes\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport classnames from 'classnames';\n\n/**\n * Class names used in component.\n */\nconst componentClassName = 'ms-order-history-with-search-and-filters-view-mode-selector';\nconst detailsViewClassName = `${componentClassName}__detailed-view`;\nconst listViewClassName = `${componentClassName}__list-view`;\nconst viewSelectedClassName = `${componentClassName}__selected`;\n\n/**\n * IOrderHistoryWithSearchAndFiltersViewModeResources interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersViewModeResources {\n    listViewOptionAriaLabel?: string;\n    detailedViewOptionAriaLabel?: string;\n}\n\n/**\n * OrderHistoryWithSearchAndFiltersViewModeState interface.\n */\nexport enum OrderHistoryWithSearchAndFiltersViewModeState {\n    DetailedView,\n    ListView\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersViewModeProps interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersViewModeProps extends IComponentProps<{}> {\n    className?: string;\n    resources?: IOrderHistoryWithSearchAndFiltersViewModeResources;\n    currentViewModeState: OrderHistoryWithSearchAndFiltersViewModeState;\n    telemetryContent?: ITelemetryContent;\n    onClick(state: OrderHistoryWithSearchAndFiltersViewModeState): void;\n}\n\n/**\n * OrderHistoryWithSearchAndFiltersViewMode component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst OrderHistoryWithSearchAndFiltersViewModeFunctionalComponent: React.FC<IOrderHistoryWithSearchAndFiltersViewModeProps> = (\n    props: IOrderHistoryWithSearchAndFiltersViewModeProps\n) => {\n    const [viewModeState, setViewModeState] = React.useState(props.currentViewModeState);\n\n    const onClickHandler = (newViewModeState: OrderHistoryWithSearchAndFiltersViewModeState) => {\n        setViewModeState(newViewModeState);\n        props.onClick(newViewModeState);\n    };\n\n    // define telemetry attributes\n    const viewModeDetailedViewAttributes = getTelemetryAttributes(\n        props.telemetryContent!,\n        getPayloadObject('click', props.telemetryContent!, `${TelemetryConstant.ViewMode} - Detailed view`)\n    );\n    const viewModeListViewAttributes = getTelemetryAttributes(\n        props.telemetryContent!,\n        getPayloadObject('click', props.telemetryContent!, `${TelemetryConstant.ViewMode} - List view`)\n    );\n\n    return (\n        <div className={classnames(props.className, componentClassName)}>\n            <Button\n                className={classnames(\n                    detailsViewClassName,\n                    viewModeState === OrderHistoryWithSearchAndFiltersViewModeState.DetailedView ? viewSelectedClassName : ''\n                )}\n                aria-label={props.resources?.detailedViewOptionAriaLabel ?? ''}\n                title={props.resources?.detailedViewOptionAriaLabel ?? ''}\n                role='button'\n                onClick={() => onClickHandler(OrderHistoryWithSearchAndFiltersViewModeState.DetailedView)}\n                {...viewModeDetailedViewAttributes}\n            />\n            <Button\n                className={classnames(\n                    listViewClassName,\n                    viewModeState === OrderHistoryWithSearchAndFiltersViewModeState.ListView ? viewSelectedClassName : ''\n                )}\n                aria-label={props.resources?.listViewOptionAriaLabel ?? ''}\n                title={props.resources?.listViewOptionAriaLabel ?? ''}\n                role='button'\n                onClick={() => onClickHandler(OrderHistoryWithSearchAndFiltersViewModeState.ListView)}\n                {...viewModeListViewAttributes}\n            />\n        </div>\n    );\n};\n\n/**\n * OrderHistoryWithSearchAndFiltersViewMode component.\n */\nexport const OrderHistoryWithSearchAndFiltersViewModeComponent: React.FunctionComponent<IOrderHistoryWithSearchAndFiltersViewModeProps> = msdyn365Commerce.createComponent<\n    // @ts-expect-error\n    IOrderHistoryWithSearchAndFiltersViewModeProps\n>('OrderHistoryWithSearchAndFiltersViewModeComponent', { component: OrderHistoryWithSearchAndFiltersViewModeFunctionalComponent });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { Button, ITelemetryContent, getPayloadObject, getTelemetryAttributes } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport classnames from 'classnames';\n\n/**\n * Class names used in component.\n */\nconst componentClassName = 'ms-order-history-with-search-and-filters-organization-wide-selector';\nconst buttonClassName = `${componentClassName}__button`;\nconst buttonActiveClassName = `${componentClassName}__active-button`;\nconst buttonInactiveClassName = `${componentClassName}__inactive-button`;\n\n/**\n * IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorResources interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorResources {\n    currentUserOptionLabel: string;\n    currentUserOptionAriaLabel?: string;\n    organizationWideOptionLabel: string;\n    organizationWideOptionAriaLabel?: string;\n}\n\n/**\n * OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState interface.\n */\nexport enum OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState {\n    CurrentUser,\n    OrganizationWide\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorData interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorData {\n    customer: Customer;\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorProps interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorProps\n    extends IComponentProps<IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorData> {\n    className?: string;\n    resources: IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorResources;\n    currentSelectorState: OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState;\n    telemetryContent?: ITelemetryContent;\n    onChange(state: OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState): void;\n}\n\n/**\n * OrderHistoryWithSearchAndFiltersOrganizationWideSelector component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst OrderHistoryWithSearchAndFiltersOrganizationWideSelectorFunctionalComponent: React.FC<IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorProps> = (\n    props: IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorProps\n) => {\n    // Current version doesn't include functionality for non b2b users or non-admin b2b users.\n    if (!props.data.customer.IsB2bAdmin) {\n        return <div className={classnames(props.className, componentClassName)} />;\n    }\n\n    const [selectorState, setSelectorState] = React.useState(props.currentSelectorState);\n\n    const onClickHandler = (newSelectorState: OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState) => {\n        setSelectorState(newSelectorState);\n        props.onChange(newSelectorState);\n    };\n\n    // define telemetry attributes\n    const currentUserOrderHistoryAttributes = getTelemetryAttributes(\n        props.telemetryContent!,\n        getPayloadObject('click', props.telemetryContent!, props.resources?.currentUserOptionLabel ?? 'Current user order history')\n    );\n    const orgWideOrderHistoryAttributes = getTelemetryAttributes(\n        props.telemetryContent!,\n        getPayloadObject('click', props.telemetryContent!, props.resources?.currentUserOptionLabel ?? 'Org wide order history')\n    );\n\n    return (\n        <div className={classnames(props.className, componentClassName)}>\n            <Button\n                className={classnames(\n                    buttonClassName,\n                    selectorState === OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState.CurrentUser\n                        ? buttonActiveClassName\n                        : buttonInactiveClassName\n                )}\n                aria-label={props.resources?.currentUserOptionAriaLabel ?? props.resources?.currentUserOptionLabel}\n                title={props.resources?.currentUserOptionAriaLabel ?? props.resources?.currentUserOptionLabel}\n                onClick={() => onClickHandler(OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState.CurrentUser)}\n                {...currentUserOrderHistoryAttributes}\n            >\n                {props.resources?.currentUserOptionLabel}\n            </Button>\n            <Button\n                className={classnames(\n                    buttonClassName,\n                    selectorState === OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState.OrganizationWide\n                        ? buttonActiveClassName\n                        : buttonInactiveClassName\n                )}\n                aria-label={props.resources?.organizationWideOptionAriaLabel ?? props.resources?.organizationWideOptionLabel}\n                title={props.resources?.organizationWideOptionAriaLabel ?? props.resources?.organizationWideOptionLabel}\n                onClick={() => onClickHandler(OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState.OrganizationWide)}\n                {...orgWideOrderHistoryAttributes}\n            >\n                {props.resources?.organizationWideOptionLabel}\n            </Button>\n        </div>\n    );\n};\n\n/**\n * OrderHistoryWithSearchAndFiltersOrganizationWideSelector component.\n */\nexport const OrderHistoryWithSearchAndFiltersOrganizationWideSelectorComponent: React.FunctionComponent<IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorProps> = msdyn365Commerce.createComponent<\n    // @ts-expect-error\n    IOrderHistoryWithSearchAndFiltersOrganizationWideSelectorProps\n>('OrderHistoryWithSearchAndFiltersOrganizationWideSelectorComponent', {\n    component: OrderHistoryWithSearchAndFiltersOrganizationWideSelectorFunctionalComponent\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport classnames from 'classnames';\n\nimport { SalesOrder } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Class names used in component.\n */\nconst componentClassName = 'ms-order-history-with-search-and-filters-header';\nconst headingClassName = `${componentClassName}__heading`;\nconst orderCountClassName = `${componentClassName}__order-count`;\n\n/**\n * IOrderHistoryWithSearchAndFiltersHeaderResources interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersHeaderResources {\n    orderCountLabel: string;\n    ordersCountLabel: string;\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersHeaderData interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersHeaderData {\n    salesOrders: SalesOrder[];\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersHeaderProps interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersHeaderProps\n    extends Msdyn365.IComponentProps<IOrderHistoryWithSearchAndFiltersHeaderData> {\n    className?: string;\n    resources: IOrderHistoryWithSearchAndFiltersHeaderResources;\n    textProps: Msdyn365.ITextProps;\n    showOrderCount: boolean;\n    extraActions?: React.ReactNode;\n    onChange(event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * OrderHistoryWithSearchAndFiltersHeader component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst OrderHistoryWithSearchAndFiltersHeaderFunctionalComponent: React.FC<IOrderHistoryWithSearchAndFiltersHeaderProps> = (\n    props: IOrderHistoryWithSearchAndFiltersHeaderProps\n) => {\n    const {\n        resources,\n        data: { salesOrders },\n        textProps,\n        showOrderCount,\n        extraActions\n    } = props;\n\n    const orderCount = salesOrders?.length;\n    const orderCountText = `(${orderCount} ${orderCount === 1 ? resources?.orderCountLabel : resources?.ordersCountLabel})`;\n\n    return (\n        <Node className={classnames(props.className, componentClassName)}>\n            {textProps?.text && (\n                <Msdyn365.Text\n                    {...textProps}\n                    className={headingClassName}\n                    tag={textProps.tag || 'h2'}\n                    editProps={{ onEdit: props.onChange, requestContext: props.context.request }}\n                />\n            )}\n            {showOrderCount && <span className={orderCountClassName}>{orderCountText}</span>}\n            {extraActions}\n        </Node>\n    );\n};\n\n/**\n * OrderHistoryWithSearchAndFiltersHeader component.\n */\nexport const OrderHistoryWithSearchAndFiltersHeaderComponent: React.FunctionComponent<IOrderHistoryWithSearchAndFiltersHeaderProps> = Msdyn365.msdyn365Commerce.createComponent<\n    // @ts-expect-error\n    IOrderHistoryWithSearchAndFiltersHeaderProps\n>('OrderHistoryWithSearchAndFiltersHeaderComponent', { component: OrderHistoryWithSearchAndFiltersHeaderFunctionalComponent });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, ICoreContext, IDateFormatOptions, msdyn365Commerce, isOboRequest } from '@msdyn365-commerce/core';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ChannelIdentity, Customer, OrderOriginator, OrgUnitLocation, SalesOrder } from '@msdyn365-commerce/retail-proxy';\nimport {\n    ActionMenuComponent,\n    TableCellComponent,\n    TableComponent,\n    TableCellContentType,\n    TableHeaderComponent,\n    TableRowComponent\n} from '@msdyn365-commerce/components';\nimport React from 'react';\n\nimport classnames from 'classnames';\n\nimport {\n    Button,\n    ITelemetryContent,\n    TelemetryConstant,\n    getPayloadObject,\n    getTelemetryAttributes\n} from '@msdyn365-commerce-modules/utilities';\nimport { countItems, getOrderChannelAddress, getOrderChannelName, getOrderChannelTypeValue, isOnlineStoreChannel } from '../../../common';\nimport {\n    IOrderHistoryWithSearchAndFiltersOrderStatusResources,\n    getOrderDetailsPageUrl,\n    getOrderStatusLabel\n} from '../common/get-sales-order';\n\n/**\n * Class names used in component.\n */\nconst componentClassName = 'ms-order-history-with-search-and-filters-order-table';\nconst placedByClassName = `${componentClassName}__row__placed-by`;\nconst orderNumberClassName = `${componentClassName}__row__order-number`;\nconst columnMobileClassName = `${componentClassName}__row__mobile-cell`;\nconst actionsClassName = `${componentClassName}__row__actions`;\nconst viewDetailsMenuItemClassName = `${componentClassName}__row__view-details-action`;\n\n/**\n * IOrderHistoryWithSearchAndFiltersOrderTableResources interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersOrderTableResources extends IOrderHistoryWithSearchAndFiltersOrderStatusResources {\n    orderHistoryOrderNumberText: string;\n    orderHistoryCreatedDateText: string;\n    orderHistoryItemsText: string;\n    orderHistoryTotalText: string;\n    orderHistoryOriginText: string;\n    orderHistoryOrderStatusText: string;\n    orderHistoryActionMenuButtonAriaLabel: string;\n    orderHistoryViewDetailsButtonText: string;\n    orderHistoryViewDetailsButtonAriaLabel: string;\n    orderHistoryCreatedDateMobileDescriptionText: string;\n    orderHistoryOrderNumberIsNotAvailable: string;\n    onlineStoreChannelNameText: string;\n    posChannelNameText: string;\n    orderPlacedByFullText?: string;\n    orderPlacedByYouText?: string;\n    orderOnBehalfOfText?: string;\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersOrderTableData interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersOrderTableData {\n    salesOrders: SalesOrder[];\n    channelIdentities?: ChannelIdentity[];\n    orgUnitLocations?: OrgUnitLocation[];\n    customer?: Customer;\n    originators?: OrderOriginator[];\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersOrderTableProps interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersOrderTableProps extends IComponentProps<IOrderHistoryWithSearchAndFiltersOrderTableData> {\n    className?: string;\n    resources: IOrderHistoryWithSearchAndFiltersOrderTableResources;\n    isMobileView?: boolean;\n    showChannelInfo: boolean;\n    showOrderPlacedBy?: boolean;\n    telemetryContent?: ITelemetryContent;\n}\n\ninterface IOnBehalfOfOrderResources {\n    orderHistoryOrderNumberIsNotAvailable?: string;\n}\n\ninterface IOnBehalfOfOrderProps {\n    salesOrder: SalesOrder;\n    isOnBehalfOfOrder: boolean;\n    originator?: OrderOriginator;\n    placedByName: string;\n    placedByText: string;\n    onBehalfOfText: string;\n    showOrderPlacedBy?: boolean;\n    resources: IOnBehalfOfOrderResources;\n}\n\n/**\n * Formats amount.\n * @param context - Core context.\n * @param amount - Amount to display.\n * @param currencyCode - Currency for the amount.\n * @returns String value.\n */\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n    if (amount === undefined) {\n        return '';\n    }\n    return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\n/**\n * Formats date.\n * @param context - Core context.\n * @param date - Date to display.\n * @returns String value.\n */\nconst formatDate = (context: ICoreContext, date: Date | undefined) => {\n    if (date === undefined) {\n        return '';\n    }\n\n    const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'short', day: 'numeric' };\n    return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\nconst getShortEllipsisText = (originalText: string, maxTextLength: number) => {\n    const isRtl = document.body.parentElement?.getAttribute('dir') === 'rtl';\n    return originalText.length > maxTextLength\n        ? isRtl\n            ? `…${originalText.substring(0, maxTextLength - 1)}`\n            : `${originalText.substring(0, maxTextLength - 1)}…`\n        : originalText;\n};\n\nconst getOnBehalfOfOrderProps = (\n    props: IOrderHistoryWithSearchAndFiltersOrderTableProps,\n    salesOrder: SalesOrder\n): IOnBehalfOfOrderProps => {\n    const {\n        data: { channelIdentities, orgUnitLocations, customer, originators },\n        resources: { orderPlacedByFullText, orderPlacedByYouText, orderOnBehalfOfText, orderHistoryOrderNumberIsNotAvailable }\n    } = props;\n\n    const channelAddress = getOrderChannelAddress(salesOrder, orgUnitLocations);\n    const channelTypeValue = getOrderChannelTypeValue(salesOrder, channelIdentities);\n    const isOnlineStore = isOnlineStoreChannel(channelTypeValue, channelAddress);\n\n    const originator: OrderOriginator | undefined = originators?.find(\n        originator =>\n            (salesOrder.SalesId && originator.SalesId === salesOrder.SalesId) ||\n            (salesOrder.Id && originator.TransactionId === salesOrder.Id)\n    );\n\n    const isYou =\n        !isOboRequest(props.context.request) &&\n        originator?.CustomerId &&\n        originator?.CustomerName &&\n        !originator?.StaffId &&\n        !originator?.StaffName &&\n        customer?.AccountNumber === originator?.CustomerId\n            ? true\n            : false;\n    const isYouObo = !isYou && !isOboRequest(props.context.request);\n    let placedByName =\n        originator?.StaffId && originator.StaffName\n            ? originator.StaffName\n            : originator?.CustomerId && originator.CustomerName\n            ? originator.CustomerName\n            : '-';\n    placedByName = `${placedByName} ${isYou ? orderPlacedByYouText : ''}`;\n    const isOnBehalfOfOrder = isOnlineStore && originator?.StaffName && customer?.Name;\n    const placedByText = `${orderPlacedByFullText} ${placedByName}`;\n    const onBehalfOfText = `${orderOnBehalfOfText} ${customer?.Name} ${isYouObo ? orderPlacedByYouText : ''}`;\n\n    return {\n        resources: { orderHistoryOrderNumberIsNotAvailable: orderHistoryOrderNumberIsNotAvailable },\n        salesOrder: salesOrder,\n        isOnBehalfOfOrder: !!isOnBehalfOfOrder,\n        originator: originator,\n        placedByName: placedByName,\n        placedByText: placedByText,\n        onBehalfOfText: onBehalfOfText,\n        showOrderPlacedBy: props.showOrderPlacedBy\n    };\n};\n\nconst getOrderPlacedByCellContent = (props: IOnBehalfOfOrderProps): JSX.Element | null => {\n    const maxOrderTextLength = window.innerWidth > 700 ? 20 : 12;\n    return (\n        <span className={placedByClassName} data-title={`${props.placedByName} ${props.isOnBehalfOfOrder ? props.onBehalfOfText : ''}`}>\n            {props.placedByName}\n            {props.isOnBehalfOfOrder && (\n                <>\n                    <br /> {getShortEllipsisText(props.onBehalfOfText, maxOrderTextLength)}\n                </>\n            )}\n        </span>\n    );\n};\n\nconst getOrderNumberCellContent = (onBehalfOfOrderProps: IOnBehalfOfOrderProps, linkToOrderDetails: string): JSX.Element | null => {\n    const maxOrderTextLength = window.innerWidth > 700 ? 20 : 12;\n    const {\n        salesOrder,\n        isOnBehalfOfOrder,\n        placedByText,\n        showOrderPlacedBy,\n        resources: { orderHistoryOrderNumberIsNotAvailable }\n    } = onBehalfOfOrderProps;\n\n    let orderNumberCellText = salesOrder.SalesId;\n    if (StringExtensions.isNullOrWhitespace(orderNumberCellText)) {\n        orderNumberCellText = orderHistoryOrderNumberIsNotAvailable;\n    }\n\n    return (\n        <>\n            <Button className={orderNumberClassName} href={linkToOrderDetails ?? ''}>\n                {orderNumberCellText}\n            </Button>\n            {isOnBehalfOfOrder && !showOrderPlacedBy && (\n                <span className={placedByClassName} data-title={placedByText}>\n                    {getShortEllipsisText(placedByText, maxOrderTextLength)}\n                </span>\n            )}\n        </>\n    );\n};\n\nconst getTableRowComponentChildren = (\n    props: IOrderHistoryWithSearchAndFiltersOrderTableProps,\n    index: number,\n    salesOrder: SalesOrder\n): React.ReactElement[] => {\n    const numItemsCellText: number = ArrayExtensions.hasElements(salesOrder.SalesLines) ? countItems(salesOrder.SalesLines) : 0;\n    const totalAmountCellText: string = formatAmount(props.context, salesOrder.TotalAmount, salesOrder.CurrencyCode);\n\n    const orderStatusCellText: string = getOrderStatusLabel(salesOrder.StatusValue, props.resources);\n\n    const channelName: string = getOrderChannelName(salesOrder, props.data.channelIdentities);\n    const channelAddress: string = getOrderChannelAddress(salesOrder, props.data.orgUnitLocations);\n    const channelNameCellText: string =\n        channelName &&\n        (channelAddress ? `${props.resources.posChannelNameText} ${channelName}` : props.resources.onlineStoreChannelNameText);\n\n    const onBehalfOfOrderProps: IOnBehalfOfOrderProps = getOnBehalfOfOrderProps(props, salesOrder);\n\n    const linkToOrderDetails = getOrderDetailsPageUrl(props.context.actionContext, salesOrder);\n\n    const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.OrderDetails);\n    const orderDetailsAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n\n    return [\n        <TableCellComponent\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            data={{}}\n            key={`row_${index}_0`}\n            contentType={TableCellContentType.Text}\n            isVisible={!!props.showOrderPlacedBy && !props.isMobileView}\n        >\n            {getOrderPlacedByCellContent(onBehalfOfOrderProps)}\n        </TableCellComponent>,\n        <TableCellComponent\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            data={{}}\n            key={`row_${index}_1`}\n            contentType={TableCellContentType.Text}\n            isVisible={true}\n        >\n            {getOrderNumberCellContent(onBehalfOfOrderProps, linkToOrderDetails)}\n        </TableCellComponent>,\n        <TableCellComponent\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            data={{}}\n            key={`row_${index}_2`}\n            contentType={TableCellContentType.Text}\n            isVisible={!!props.showChannelInfo && !props.isMobileView}\n        >\n            {channelNameCellText}\n        </TableCellComponent>,\n        <TableCellComponent\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            data={{}}\n            key={`row_${index}_3`}\n            contentType={TableCellContentType.Number}\n            isVisible={!props.isMobileView}\n        >\n            {numItemsCellText}\n        </TableCellComponent>,\n        <TableCellComponent\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            data={{}}\n            key={`row_${index}_4`}\n            contentType={TableCellContentType.Amount}\n            isVisible={!props.isMobileView}\n        >\n            {totalAmountCellText}\n        </TableCellComponent>,\n        <TableCellComponent\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            data={{}}\n            key={`row_${index}_5`}\n            contentType={TableCellContentType.Date}\n            isVisible={!props.isMobileView}\n        >\n            {formatDate(props.context, salesOrder.CreatedDateTime)}\n        </TableCellComponent>,\n        <TableCellComponent\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            data={{}}\n            key={`row_${index}_6`}\n            contentType={TableCellContentType.Text}\n            isVisible={true}\n        >\n            {orderStatusCellText}\n        </TableCellComponent>,\n        <TableCellComponent\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            data={{}}\n            key={`row_${index}_7`}\n            className={classnames(actionsClassName)}\n            contentType={TableCellContentType.Text}\n            isVisible={true}\n        >\n            <ActionMenuComponent\n                context={props.context}\n                id={props.id}\n                typeName={props.typeName}\n                data={{}}\n                ariaLabel={props.resources.orderHistoryActionMenuButtonAriaLabel}\n            >\n                <Button\n                    className={viewDetailsMenuItemClassName}\n                    href={linkToOrderDetails ?? ''}\n                    title={props.resources.orderHistoryViewDetailsButtonText ?? ''}\n                    aria-label={props.resources.orderHistoryViewDetailsButtonAriaLabel ?? props.resources.orderHistoryViewDetailsButtonText}\n                    {...orderDetailsAttributes}\n                >\n                    {props.resources.orderHistoryViewDetailsButtonText}\n                </Button>\n            </ActionMenuComponent>\n        </TableCellComponent>\n    ];\n};\n\n/**\n * OrderHistoryWithSearchAndFiltersOrderTable component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst OrderHistoryWithSearchAndFiltersOrderTableFunctionalComponent: React.FC<IOrderHistoryWithSearchAndFiltersOrderTableProps> = (\n    props: IOrderHistoryWithSearchAndFiltersOrderTableProps\n) => {\n    return (\n        <TableComponent\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            data={{}}\n            className={classnames(props.className, componentClassName)}\n        >\n            <TableHeaderComponent context={props.context} id={props.id} typeName={props.typeName} data={{}}>\n                <TableCellComponent\n                    context={props.context}\n                    id={props.id}\n                    typeName={props.typeName}\n                    data={{}}\n                    contentType={TableCellContentType.Text}\n                    isVisible={!!props.showOrderPlacedBy && !props.isMobileView}\n                >\n                    {props.resources.orderPlacedByFullText ?? ''}\n                </TableCellComponent>\n                <TableCellComponent\n                    context={props.context}\n                    id={props.id}\n                    typeName={props.typeName}\n                    data={{}}\n                    className={classnames(props.isMobileView ? columnMobileClassName : '')}\n                    contentType={TableCellContentType.Text}\n                    isVisible={true}\n                >\n                    {props.resources.orderHistoryOrderNumberText}\n                </TableCellComponent>\n                <TableCellComponent\n                    context={props.context}\n                    id={props.id}\n                    typeName={props.typeName}\n                    data={{}}\n                    contentType={TableCellContentType.Text}\n                    isVisible={!!props.showChannelInfo && !props.isMobileView}\n                >\n                    {props.resources.orderHistoryOriginText}\n                </TableCellComponent>\n                <TableCellComponent\n                    context={props.context}\n                    id={props.id}\n                    typeName={props.typeName}\n                    data={{}}\n                    contentType={TableCellContentType.Number}\n                    isVisible={!props.isMobileView}\n                >\n                    {props.resources.orderHistoryItemsText}\n                </TableCellComponent>\n                <TableCellComponent\n                    context={props.context}\n                    id={props.id}\n                    typeName={props.typeName}\n                    data={{}}\n                    contentType={TableCellContentType.Amount}\n                    isVisible={!props.isMobileView}\n                >\n                    {props.resources.orderHistoryTotalText}\n                </TableCellComponent>\n                <TableCellComponent\n                    context={props.context}\n                    id={props.id}\n                    typeName={props.typeName}\n                    data={{}}\n                    contentType={TableCellContentType.Date}\n                    isVisible={!props.isMobileView}\n                >\n                    {props.resources.orderHistoryCreatedDateText}\n                </TableCellComponent>\n                <TableCellComponent\n                    context={props.context}\n                    id={props.id}\n                    typeName={props.typeName}\n                    data={{}}\n                    contentType={TableCellContentType.Text}\n                    isVisible={true}\n                >\n                    {props.resources.orderHistoryOrderStatusText}\n                </TableCellComponent>\n                <TableCellComponent\n                    context={props.context}\n                    id={props.id}\n                    typeName={props.typeName}\n                    data={{}}\n                    contentType={TableCellContentType.Text}\n                    isVisible={true}\n                />\n            </TableHeaderComponent>\n            {props.data.salesOrders?.map((salesOrder: SalesOrder, index: number) => {\n                return (\n                    <TableRowComponent context={props.context} id={props.id} typeName={props.typeName} data={{}} key={`row_${index}`}>\n                        {getTableRowComponentChildren(props, index, salesOrder)}\n                    </TableRowComponent>\n                );\n            })}\n        </TableComponent>\n    );\n};\n\n/**\n * OrderHistoryWithSearchAndFiltersOrderTable component.\n */\nexport const OrderHistoryWithSearchAndFiltersOrderTableComponent: React.FunctionComponent<IOrderHistoryWithSearchAndFiltersOrderTableProps> = msdyn365Commerce.createComponent<\n    // @ts-expect-error\n    IOrderHistoryWithSearchAndFiltersOrderTableProps\n>('OrderHistoryWithSearchAndFiltersOrderTableComponent', { component: OrderHistoryWithSearchAndFiltersOrderTableFunctionalComponent });\n"],"names":["ExpandButtonState","constructor","extraProductsCount","this","__decorate","observable","SalesLineState","stateId","isHidden","getOrderDetailsPageUrl","actionContext","salesOrder","orderDetailsUrl","getUrlSync","separator","includes","StringExtensions","isNullOrWhitespace","SalesId","Id","getOrderStatusLabel","status","resources","SalesStatus","Created","orderStatusCreated","Delivered","orderStatusDelivered","Invoiced","orderStatusInvoiced","Canceled","orderStatusCanceled","componentClassName","orderListItemClassName","orderInformationHeaderClassName","expandProductsButtonClassName","expandProductsButtonWrapperClassName","orderDetailButtonClassName","moduleName","OrderInfomationComponent","_ref","orderInformationProps","placedBy","salesId","receiptId","channelName","createdDate","count","amount","channelReferenceId","React","Node","Object","assign","className","GroupDeliveryComponent","_ref2","deliveryProps","heading","processing","address","trackingInfo","GroupComponent","_ref3","groupProps","delivery","salesLinesProps","salesLines","map","salesLine","key","data","LineId","GroupsComponent","_ref4","groupsProps","groups","group","index","onExpandProductsCallback","expandButtonState","productStates","productState","OrderHistoryWithSearchAndFiltersOrderListComponent","msdyn365Commerce","createComponent","component","props","classnames","ArrayExtensions","hasElements","salesOrders","itemProps","createOrderHistoryWithSearchAndFiltersOrderItemProps","id","typeName","context","moduleProps","telemetry","products","channelIdentities","orgUnitLocations","customer","originators","showChannelInfo","telemetryContent","freePriceText","detailsAriaLabel","detailsLabel","orderItemLabel","orderItemsLabel","retailMultiplePickUpOptionEnabled","channelDeliveryOptionConfig","priceContext","originator","find","TransactionId","salesLinesInput","getSalesLinesInput","undefined","expandProductsButton","getSalesLinesInputProps","_objectSpread","imageOnly","ObjectExtensions","isNullOrUndefined","salesLinesLimit","length","salesLineStates","_salesLine$LineId","Observer","text","format","orderHistoryExpandProductsButtonText","Button","title","role","onClick","getSalesLines","getGroups","orderInfomationInput","getOrderInformationInput","payLoad","getPayloadObject","TelemetryConstant","OrderDetails","orderDetailsAttributes","getTelemetryAttributes","orderDetailsLink","href","ChannelReferenceId","replace","orderInfomation","getOrderInformation","detailsViewClassName","listViewClassName","viewSelectedClassName","OrderHistoryWithSearchAndFiltersViewModeState","OrderHistoryWithSearchAndFiltersViewModeComponent","_props$resources$deta","_props$resources","_props$resources$deta2","_props$resources2","_props$resources$list","_props$resources3","_props$resources$list2","_props$resources4","viewModeState","setViewModeState","currentViewModeState","onClickHandler","newViewModeState","viewModeDetailedViewAttributes","ViewMode","viewModeListViewAttributes","DetailedView","detailedViewOptionAriaLabel","ListView","listViewOptionAriaLabel","buttonClassName","buttonActiveClassName","buttonInactiveClassName","OrderHistoryWithSearchAndFiltersOrganizationWideSelectorState","OrderHistoryWithSearchAndFiltersOrganizationWideSelectorComponent","_props$resources$curr","_props$resources$curr2","_props$resources$curr3","_props$resources$curr4","_props$resources5","_props$resources6","_props$resources7","_props$resources$orga","_props$resources8","_props$resources9","_props$resources$orga2","_props$resources10","_props$resources11","_props$resources12","IsB2bAdmin","selectorState","setSelectorState","currentSelectorState","newSelectorState","onChange","currentUserOrderHistoryAttributes","currentUserOptionLabel","orgWideOrderHistoryAttributes","CurrentUser","currentUserOptionAriaLabel","OrganizationWide","organizationWideOptionAriaLabel","organizationWideOptionLabel","headingClassName","orderCountClassName","OrderHistoryWithSearchAndFiltersHeaderComponent","Msdyn365","textProps","showOrderCount","extraActions","orderCount","orderCountText","orderCountLabel","ordersCountLabel","tag","editProps","onEdit","requestContext","request","placedByClassName","orderNumberClassName","columnMobileClassName","actionsClassName","viewDetailsMenuItemClassName","formatDate","date","cultureFormatter","year","month","day","getShortEllipsisText","originalText","maxTextLength","_document$body$parent","isRtl","document","body","parentElement","getAttribute","substring","getOrderPlacedByCellContent","maxOrderTextLength","window","innerWidth","placedByName","isOnBehalfOfOrder","onBehalfOfText","getOrderNumberCellContent","onBehalfOfOrderProps","linkToOrderDetails","placedByText","showOrderPlacedBy","orderHistoryOrderNumberIsNotAvailable","orderNumberCellText","getTableRowComponentChildren","_props$resources$orde","_props$resources$orde2","numItemsCellText","SalesLines","countItems","totalAmountCellText","TotalAmount","currencyCode","CurrencyCode","formatCurrency","formatAmount","orderStatusCellText","StatusValue","getOrderChannelName","channelAddress","getOrderChannelAddress","channelNameCellText","posChannelNameText","onlineStoreChannelNameText","getOnBehalfOfOrderProps","orderPlacedByFullText","orderPlacedByYouText","orderOnBehalfOfText","channelTypeValue","getOrderChannelTypeValue","isOnlineStore","isOnlineStoreChannel","isYou","isOboRequest","CustomerId","CustomerName","StaffId","StaffName","AccountNumber","isYouObo","Name","TableCellComponent","contentType","TableCellContentType","Text","isVisible","isMobileView","Number","Amount","Date","CreatedDateTime","ActionMenuComponent","ariaLabel","orderHistoryActionMenuButtonAriaLabel","orderHistoryViewDetailsButtonText","orderHistoryViewDetailsButtonAriaLabel","OrderHistoryWithSearchAndFiltersOrderTableComponent","_props$resources$orde3","_props$data$salesOrde","TableComponent","TableHeaderComponent","orderHistoryOrderNumberText","orderHistoryOriginText","orderHistoryItemsText","orderHistoryTotalText","orderHistoryCreatedDateText","orderHistoryOrderStatusText","TableRowComponent"],"sourceRoot":""}