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,wFCjCA,MAMA,EANqD1Q,GACjDF,EAAAA,cAAA,MAAA+C,OAAAmK,OAAA,CAAK3E,UAAWrI,EAAMqI,UAAWmD,GAAIxL,EAAMwL,IAAQxL,EAAM2Q,uBAAuB3Q,IAC3EA,EAAMmQ,krBCSf,MAAMS,UAAe9Q,EAAAA,cACV2F,SACH,MAAM,UAAE4C,GAAclI,KAAKH,MAAMQ,OAC3BqQ,EAAc1Q,KAAKH,MAAMQ,OAAOsQ,aAAe,MAAM3Q,KAAKH,MAAMQ,OAAOsQ,eAAiB,YACxFpL,EAASC,EAAAA,EAAA,GAGRxF,KAAKH,OAAK,IACbqI,UAAYA,GAAa+F,IAAWyC,EAAaxI,IAAewI,IAGpE,OAAO1Q,KAAKH,MAAM4F,WAAWF,EACjC,EAGJ,wFCzBA,MAUA,EAV+C1F,IAC3C,MAAM+Q,EAAQ/Q,EAAMQ,OAAOwQ,SAAWlR,EAAAA,cAAA,MAAIuI,UAAW,uBAErD,OACIvI,EAAAA,cAAA,MAAA+C,OAAAmK,OAAA,CAAK3E,UAAWrI,EAAMqI,UAAWmD,GAAIxL,EAAMwL,IAAQxL,EAAM2Q,uBAAuB3Q,IAC3E+Q,EACC,yECPd,YAAqBjR,EAAAA,cAAA,mFCArB,YAAqBA,EAAAA,cAAA","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/allowable-freight/utils/AllowableFreightStatusEnum.ts?9853","webpack://Msdyn365.Commerce.Online/./src/modules/allowable-freight/allowable-freight.tsx?476b","webpack://Msdyn365.Commerce.Online/./src/modules/allowable-freight/allowable-freight.view.tsx?1c71","webpack://Msdyn365.Commerce.Online/./src/modules/allowable-freight/utils/AllowableFreightProgressBarEnum.ts?27b9","webpack://Msdyn365.Commerce.Online/./src/modules/order-scheduler/order-scheduler.props.autogenerated.ts?e2f8","webpack://Msdyn365.Commerce.Online/./src/modules/order-scheduler/order-scheduler.tsx?eb17","webpack://Msdyn365.Commerce.Online/./src/modules/order-scheduler/order-scheduler.view.tsx?32ee","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/gardner-theme-b2c.tsx?c9b7","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/gardner-theme.tsx?0207","webpack://Msdyn365.Commerce.Online/./src/modules/default-page/default-page.tsx?b382","webpack://Msdyn365.Commerce.Online/./src/modules/place-holder-for-container-preview/place-holder-for-container-preview.tsx?605e","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/fabrikam.tsx?5b10","webpack://Msdyn365.Commerce.Online/./src/modules/html-block/html-block.tsx?c080","webpack://Msdyn365.Commerce.Online/./src/modules/html-block/html-block.view.tsx?b072","webpack://Msdyn365.Commerce.Online/./src/modules/spacer/spacer.tsx?7565","webpack://Msdyn365.Commerce.Online/./src/modules/spacer/spacer.view.tsx?1f15","webpack://Msdyn365.Commerce.Online/./src/modules/starter/starter.tsx?aade","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/adventureworks.tsx?8342"],"sourcesContent":["export enum AllowableFreightStatusType {\r\n Oil = 'Oil',\r\n Oversized = 'Oversized',\r\n LTL = 'LTL'\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { IAllowableFreightData } from './allowable-freight.data';\r\nimport { IAllowableFreightProps } from './allowable-freight.props.autogenerated';\r\nimport { AllowableFreightStatusType } from './utils/AllowableFreightStatusEnum';\r\nimport { AllowableFreightProgressBarClassEnum } from './utils/AllowableFreightProgressBarEnum';\r\nimport { reaction } from 'mobx';\r\nimport _ from 'lodash';\r\nimport { IAllowableFreightCalculation, IAllowableFreightStatusLine, IProductCodeEntity } from '../../actions/DataServiceEntities.g';\r\n\r\nimport getAllowableFreightCalculationAction, {\r\n GetAllowableFreightCalculationInput\r\n} from '../../actions/get-allowable-freight-calculation.action';\r\nimport { CartLine } from '@msdyn365-commerce/retail-proxy';\r\nimport { getProductCodesAsync } from '../../actions/DataActionExtension.g';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nexport interface IAllowableFreightViewProps extends IAllowableFreightProps {\r\n state: AllowableFreightState;\r\n}\r\nexport interface AllowableFreightState {\r\n containsOil: boolean;\r\n oversizedItem: boolean;\r\n mustShipLTL: boolean;\r\n limitReached: boolean;\r\n cartFreight: number;\r\n sliderColourClass: string;\r\n errorMessage: string | undefined;\r\n maxLimit: number;\r\n isUnitCount: boolean;\r\n cartHasSpringPromoCoupon: boolean;\r\n productCodes: IProductCodeEntity[];\r\n}\r\n\r\n/**\r\n *\r\n * AllowableFreight component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass AllowableFreight extends React.PureComponent, AllowableFreightState> {\r\n constructor(props: IAllowableFreightProps) {\r\n super(props);\r\n this.state = {\r\n containsOil: false,\r\n oversizedItem: false,\r\n mustShipLTL: false,\r\n limitReached: false,\r\n cartFreight: 0,\r\n sliderColourClass: AllowableFreightProgressBarClassEnum.Red,\r\n errorMessage: undefined,\r\n maxLimit: 0,\r\n isUnitCount: false,\r\n cartHasSpringPromoCoupon: false,\r\n productCodes: []\r\n };\r\n }\r\n public componentDidMount() {\r\n if (this.props.data.cart.result?.cart) {\r\n const {\r\n data: {\r\n cart: {\r\n result: {\r\n cart: { Id, CartLines }\r\n }\r\n }\r\n }\r\n } = this.props;\r\n\r\n this.setState({ cartHasSpringPromoCoupon: this.cartHasSpringPromoCoupons() });\r\n void this.updateAllowableFreightv2(Id, CartLines || []);\r\n void this.getProductCodesForCartLines();\r\n }\r\n\r\n reaction(\r\n () => this.props.data.cart.result?.cart,\r\n () => {\r\n if (this.props.data.cart.result?.cart) {\r\n const {\r\n data: {\r\n cart: {\r\n result: {\r\n cart: { Id, CartLines }\r\n }\r\n }\r\n }\r\n } = this.props;\r\n this.setState({ cartHasSpringPromoCoupon: this.cartHasSpringPromoCoupons() });\r\n // this.updateAllowableFreight(this.props.data.cart.result!.cart);\r\n void this.updateAllowableFreightv2(Id, CartLines || []);\r\n void this.getProductCodesForCartLines();\r\n }\r\n }\r\n );\r\n }\r\n\r\n public cartHasSpringPromoCoupons = () => {\r\n if (this.props.data.cart.result) {\r\n const {\r\n data: {\r\n cart: {\r\n result: {\r\n cart: { Coupons }\r\n }\r\n }\r\n },\r\n config: { springPromoCoupons }\r\n } = this.props;\r\n if (ArrayExtensions.hasElements(springPromoCoupons) && ArrayExtensions.hasElements(Coupons)) {\r\n const items = _.intersection(\r\n springPromoCoupons.map(c => c.toUpperCase()),\r\n Coupons.map(c => c.Code?.toUpperCase()).filter(c => c !== undefined)\r\n );\r\n return ArrayExtensions.hasElements(items);\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n public getProductCodesForCartLines = async () => {\r\n const {\r\n data: {\r\n cart: { result }\r\n },\r\n context: { actionContext }\r\n } = this.props;\r\n if (!result) {\r\n return;\r\n }\r\n const itemIds = _.uniq(result.cart.CartLines?.map(cl => cl.ItemId).filter(item => item !== undefined) || []);\r\n const productCodes = await getProductCodesAsync({ callerContext: actionContext }, itemIds as string[]);\r\n if (productCodes && productCodes.ProductCodes) {\r\n this.setState({ productCodes: productCodes.ProductCodes });\r\n }\r\n };\r\n\r\n public updateAllowableFreightv2 = async (cartId: string | undefined, cartLines: CartLine[]) => {\r\n if (!cartId) {\r\n return;\r\n }\r\n const actionInput = new GetAllowableFreightCalculationInput(cartId, cartLines);\r\n const freightCalc = await getAllowableFreightCalculationAction(actionInput, this.props.context.actionContext);\r\n // const freightCalc = await getAllowableFreightAsync({ callerContext: this.props.context.actionContext }, cartId);\r\n this.checkAllowableFreightLimit(freightCalc);\r\n Object.keys(AllowableFreightStatusType).forEach(k => {\r\n // eslint-disable-next-line security/detect-object-injection\r\n if (freightCalc?.AllowableFreightStatusLine && freightCalc.AllowableFreightStatusLine.length) {\r\n // @ts-ignore\r\n this.applyGlobalState(freightCalc.AllowableFreightStatusLine, AllowableFreightStatusType[k]);\r\n }\r\n });\r\n };\r\n\r\n // public updateAllowableFreight = (cart: Cart) => {\r\n // //Check the allowable freight because it has the lowest priority, followed by the item filter.\r\n // this.checkAllowableFreightLimit(cart);\r\n // Object.keys(AllowableFreightStatusType).forEach(k => {\r\n // // eslint-disable-next-line security/detect-object-injection\r\n // this.applyGlobalState(cart, AllowableFreightStatusType[k]);\r\n // });\r\n\r\n // // this.applyFreightSliderColor();\r\n // };\r\n\r\n // private applyFreightSliderColor = () => {\r\n // if (this.state.mustShipLTL) {\r\n // this.setState({ sliderColourClass: AllowableFreightProgressBarClassEnum.Red });\r\n // return;\r\n // } else if (this.state.containsOil || this.state.oversizedItem) {\r\n // this.setState({ sliderColourClass: AllowableFreightProgressBarClassEnum.Yellow });\r\n // return;\r\n // } else if (this.state.limitReached) {\r\n // this.setState({ sliderColourClass: AllowableFreightProgressBarClassEnum.Green });\r\n // return;\r\n // }\r\n // };\r\n\r\n private checkAllowableFreightLimit = (freightCalculation: IAllowableFreightCalculation) => {\r\n if (!freightCalculation) {\r\n return;\r\n }\r\n const maxAllowableFreight = freightCalculation.ThresholdAmountTotal;\r\n\r\n const isUnitCount = freightCalculation.IsUnitCount;\r\n\r\n const cartFreight = freightCalculation.ThresholdAmountCurrent;\r\n\r\n this.setState({\r\n cartFreight: parseInt((cartFreight as unknown) as string, 10),\r\n maxLimit: parseInt((maxAllowableFreight as unknown) as string, 10)\r\n });\r\n if (cartFreight >= maxAllowableFreight) {\r\n this.setState({\r\n limitReached: true,\r\n sliderColourClass: AllowableFreightProgressBarClassEnum.Red,\r\n errorMessage: this.props.resources.freightAllowanceLimitMessage,\r\n isUnitCount: isUnitCount || false\r\n });\r\n } else {\r\n this.setState({\r\n limitReached: false,\r\n sliderColourClass: AllowableFreightProgressBarClassEnum.Red,\r\n errorMessage: undefined,\r\n isUnitCount: isUnitCount || false\r\n });\r\n }\r\n };\r\n\r\n private applyGlobalState = (statusLine: IAllowableFreightStatusLine[], key: AllowableFreightStatusType) => {\r\n const hasStatus = statusLine?.filter(f => f.StatusType === key) || false;\r\n if (hasStatus) {\r\n switch (key) {\r\n //Highest priority\r\n case AllowableFreightStatusType.LTL:\r\n this.setState({\r\n mustShipLTL: true,\r\n errorMessage: this.props.resources.mustShipLTLMessage\r\n });\r\n break;\r\n case AllowableFreightStatusType.Oil:\r\n this.setState({\r\n containsOil: true,\r\n errorMessage: this.props.resources.containsOilMessage\r\n });\r\n break;\r\n case AllowableFreightStatusType.Oversized:\r\n this.setState({\r\n oversizedItem: true,\r\n errorMessage: this.props.resources.overSizedItemMessage\r\n });\r\n break;\r\n }\r\n }\r\n };\r\n\r\n public render(): JSX.Element | null {\r\n const viewProps: IAllowableFreightViewProps = {\r\n ...this.props,\r\n state: this.state\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n}\r\n\r\nexport default AllowableFreight;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IAllowableFreightViewProps } from './allowable-freight';\r\nimport { Progress } from 'reactstrap';\r\nimport { AllowableFreightProgressBarClassEnum } from './utils/AllowableFreightProgressBarEnum';\r\nimport { IPromotionsData } from './allowable-freight.props.autogenerated';\r\n\r\nexport default (props: IAllowableFreightViewProps) => {\r\n const {\r\n data: { cart },\r\n config: { requireCouponForPromoBar, promotions },\r\n state: { maxLimit, limitReached, mustShipLTL, oversizedItem, containsOil, errorMessage, cartFreight }\r\n } = props;\r\n const minimumRange = 0;\r\n const getTickerColourClass = () => {\r\n //works on a priority system\r\n if (mustShipLTL) {\r\n return AllowableFreightProgressBarClassEnum.Red;\r\n }\r\n if (oversizedItem || containsOil) {\r\n return AllowableFreightProgressBarClassEnum.Yellow;\r\n }\r\n if (limitReached) {\r\n return AllowableFreightProgressBarClassEnum.Green;\r\n }\r\n return AllowableFreightProgressBarClassEnum.Red;\r\n };\r\n\r\n const shouldRenderPromoBars = () => {\r\n if (requireCouponForPromoBar && props.state.cartHasSpringPromoCoupon) {\r\n return true;\r\n } else if (!requireCouponForPromoBar) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n const getValueForLabel = (value: string | number) => {\r\n const formattedValue = !props.state.isUnitCount ? props.context.cultureFormatter.formatCurrency(value) : value;\r\n return formattedValue.toString();\r\n };\r\n\r\n const getProductCodeByItemId = (itemId: string) => props.state.productCodes.find(pc => pc.ItemId === itemId)?.ProductCode || null;\r\n\r\n const getMaxPromoAmount = (promotion: IPromotionsData) => Math.max(...promotion.promoBreakpoints.map(pr => pr.spendAmount));\r\n const getAmountForMfr = (promotion: IPromotionsData) => {\r\n const mfr = promotion.mfr;\r\n if (mfr === '*') {\r\n const total = (cart.result?.cart.CartLines || []).map(cl => cl.TotalAmount).reduce((tot, acc) => tot! + acc!) || 0;\r\n console.log('Total', total);\r\n return total;\r\n } else {\r\n let cartLines = cart.result?.cart.CartLines?.filter(cl => cl.ItemId?.startsWith(mfr)) || [];\r\n const { inclusionCodes, exclusionCodes } = promotion;\r\n if (inclusionCodes && inclusionCodes.length) {\r\n cartLines = cartLines.filter(cl => {\r\n const productCode = getProductCodeByItemId(cl.ItemId || '');\r\n if (productCode) {\r\n return inclusionCodes.includes(productCode);\r\n }\r\n return true;\r\n });\r\n } else if (exclusionCodes) {\r\n cartLines = cartLines.filter(cl => !exclusionCodes.includes(getProductCodeByItemId(cl.ItemId || '') || ''));\r\n }\r\n const amounts = cartLines.map(cl => cl.TotalAmount);\r\n if (Array.isArray(amounts) && !!amounts.length) {\r\n const total = amounts.reduce((tot, acc) => tot! + acc!) || 0;\r\n return total;\r\n }\r\n }\r\n return 0;\r\n };\r\n\r\n const getNextTier = (promo: IPromotionsData) => {\r\n let tierIdx = 0;\r\n let tier = promo.promoBreakpoints[tierIdx];\r\n const totalForMfr = getAmountForMfr(promo);\r\n // eslint-disable-next-line no-constant-condition\r\n while (true) {\r\n if (tier.spendAmount > totalForMfr) {\r\n return tier;\r\n }\r\n tierIdx++;\r\n const _tier = promo.promoBreakpoints[tierIdx];\r\n if (_tier) {\r\n tier = _tier;\r\n } else {\r\n break;\r\n }\r\n }\r\n return tier;\r\n };\r\n if (!props.state.cartFreight && !props.state.maxLimit) {\r\n return null;\r\n }\r\n return (\r\n
\r\n {!props.state.cartHasSpringPromoCoupon ? (\r\n
\r\n

{`${props.resources.sliderLabel}: ${getValueForLabel(cartFreight)}`}

\r\n
\r\n {getValueForLabel(minimumRange)}\r\n \r\n {getValueForLabel(maxLimit)}\r\n
\r\n {errorMessage &&
{errorMessage}
}\r\n
\r\n ) : null}\r\n\r\n {shouldRenderPromoBars() &&\r\n promotions?.map((promo, i) => {\r\n const maxPromoAmount = getMaxPromoAmount(promo);\r\n const total = getAmountForMfr(promo);\r\n if (maxPromoAmount === 0 || total === 0) {\r\n return null;\r\n }\r\n const tier = getNextTier(promo);\r\n\r\n let headerText = `Spend ${props.context.cultureFormatter.formatCurrency(tier.spendAmount - total)} to ${\r\n tier.savingText\r\n }`;\r\n if (total >= maxPromoAmount) {\r\n headerText = `${tier.savingText}!`;\r\n }\r\n const valueMax = promo.promoBreakpoints.map(bp => bp.spendAmount).reduce((tot, acc) => tot + acc);\r\n\r\n return (\r\n
\r\n

\r\n \r\n Current {promo.mfr === '*' ? '' : promo.label || promo.mfr} spend:{' '}\r\n {props.context.cultureFormatter.formatCurrency(total)}\r\n \r\n {headerText} \r\n

\r\n
\r\n {promo.label}\r\n \r\n {promo.promoBreakpoints.map((tier, idx) => {\r\n let className = 'gardner-red-promo';\r\n if (total >= tier.spendAmount) {\r\n className = `gardner-green-promo`;\r\n }\r\n if (idx > 0) {\r\n const prevTier = promo.promoBreakpoints[idx - 1];\r\n if (prevTier.spendAmount >= total) {\r\n return null;\r\n }\r\n }\r\n return (\r\n \r\n \r\n {tier.spendAmount <= total\r\n ? tier.savingText\r\n : props.context.cultureFormatter.formatCurrency(total)}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n {props.context.cultureFormatter.formatCurrency(getMaxPromoAmount(promo)).replace('.00', '')}\r\n \r\n
\r\n
\r\n );\r\n })}\r\n
\r\n );\r\n};\r\n","export enum AllowableFreightProgressBarClassEnum {\r\n Red = 'gardner-red',\r\n Green = 'gardner-green',\r\n Yellow = 'gardner-yellow'\r\n}\r\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IOrderScheduler contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport interface IOrderSchedulerConfig extends Msdyn365.IModuleConfig {\r\n className?: string;\r\n minDate?: number;\r\n maxMonths?: number;\r\n invalidDays?: IExcludeDaysData[];\r\n}\r\n\r\nexport interface IOrderSchedulerResources {\r\n saveButtonText: string;\r\n orderSchedulerLabel: string;\r\n orderScheduleSetOrEditText: string;\r\n}\r\n\r\nexport interface IOrderSchedulerProps extends Msdyn365.IModule {\r\n resources: IOrderSchedulerResources;\r\n config: IOrderSchedulerConfig;\r\n}\r\n\r\nexport const enum ExcludeDaysDay {\r\n sunday = 'sunday',\r\n monday = 'monday',\r\n tuesday = 'tuesday',\r\n wednesday = 'wednesday',\r\n thursday = 'thursday',\r\n friday = 'friday',\r\n saturday = 'saturday'\r\n}\r\n\r\nexport interface IExcludeDaysData {\r\n day?: ExcludeDaysDay;\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { IOrderSchedulerData } from './order-scheduler.data';\r\nimport { ExcludeDaysDay, IOrderSchedulerProps } from './order-scheduler.props.autogenerated';\r\nimport DatePicker from 'react-datepicker';\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\n\r\nexport interface IOrderSchedulerViewProps extends IOrderSchedulerProps {\r\n datePicker: React.ReactNode;\r\n saveButtonProps: INodeProps;\r\n fieldLabelProps: INodeProps;\r\n orderScheduleWrapperProps: INodeProps;\r\n staticDisplay: React.ReactNode;\r\n shouldDisplayStatic: boolean;\r\n}\r\ninterface IOrderSchedulerState {\r\n date: Date | null;\r\n displayStatic: boolean;\r\n}\r\n/**\r\n *\r\n * OrderScheduler component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass OrderScheduler extends React.PureComponent, IOrderSchedulerState> {\r\n private _fieldId = 'date-picker-id';\r\n constructor(props: IOrderSchedulerProps) {\r\n super(props);\r\n this.state = {\r\n date: null,\r\n displayStatic: false\r\n };\r\n }\r\n\r\n public componentDidMount() {\r\n const result = this.props.data.checkout?.result;\r\n if (result) {\r\n const date = result.checkoutCart.cart.RequestedDeliveryDate;\r\n if (date) {\r\n const dateObj = new Date(date);\r\n\r\n if (!this._checkIfDefaultDate(dateObj)) {\r\n this.setState({ date: dateObj, displayStatic: true });\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _checkIfDefaultDate = (date: Date) => date.getTime() === new Date(0).getTime();\r\n\r\n private _handleDateChange = (newDate: Date) => this.setState({ date: newDate });\r\n\r\n private _renderDatePicker = () => {\r\n const currentDateISO = Date.now();\r\n return (\r\n \r\n );\r\n };\r\n\r\n private _getExclusionDates = (currentDateISO: number): Date[] => {\r\n const maxDate = this._getMaxDate(currentDateISO);\r\n const runningDate = new Date(currentDateISO);\r\n const {\r\n config: { invalidDays, minDate }\r\n } = this.props;\r\n const datesToExclude: Date[] = [];\r\n if (!invalidDays) {\r\n return datesToExclude;\r\n }\r\n\r\n const exclude: number[] = [];\r\n if (invalidDays.find(d => d.day === ExcludeDaysDay.sunday)) {\r\n exclude.push(0);\r\n }\r\n if (invalidDays.find(d => d.day === ExcludeDaysDay.monday)) {\r\n exclude.push(1);\r\n }\r\n if (invalidDays.find(d => d.day === ExcludeDaysDay.tuesday)) {\r\n exclude.push(2);\r\n }\r\n if (invalidDays.find(d => d.day === ExcludeDaysDay.wednesday)) {\r\n exclude.push(3);\r\n }\r\n if (invalidDays.find(d => d.day === ExcludeDaysDay.thursday)) {\r\n exclude.push(4);\r\n }\r\n if (invalidDays.find(d => d.day === ExcludeDaysDay.friday)) {\r\n exclude.push(5);\r\n }\r\n if (invalidDays.find(d => d.day === ExcludeDaysDay.saturday)) {\r\n exclude.push(6);\r\n }\r\n let i = 0;\r\n while (runningDate < maxDate) {\r\n if (minDate && i < minDate) {\r\n datesToExclude.push(new Date(runningDate));\r\n i++;\r\n } else {\r\n const day = runningDate.getDay();\r\n if (exclude.includes(day)) {\r\n datesToExclude.push(new Date(runningDate));\r\n }\r\n }\r\n runningDate.setDate(runningDate.getDate() + 1);\r\n }\r\n return datesToExclude;\r\n };\r\n\r\n private _getMaxDate = (currentDateISO: number) => {\r\n const {\r\n config: { maxMonths }\r\n } = this.props;\r\n const date = new Date(currentDateISO);\r\n date.setMonth(date.getMonth() + (maxMonths || 12));\r\n return date;\r\n };\r\n\r\n private _saveOrderSchedule = () => {\r\n const {\r\n data: {\r\n checkout: { result }\r\n }\r\n } = this.props;\r\n\r\n if (result) {\r\n const cart = Object.assign({}, result.checkoutCart.cart);\r\n if (cart) {\r\n void result.checkoutCart\r\n .updateCart({\r\n newCartObject: { ...cart, RequestedDeliveryDate: this.state.date || new Date(0) }\r\n })\r\n .then(() => this.setState({ displayStatic: (this.state.date && !this._checkIfDefaultDate(this.state.date)) || false }));\r\n }\r\n }\r\n };\r\n\r\n private _renderStaticDisplay = (): React.ReactNode => (\r\n \r\n

\r\n {this.props.resources.orderSchedulerLabel}: {this.state.date?.toLocaleDateString() || ''}\r\n

\r\n this.setState({ displayStatic: false })} key={'order-schedule-a'}>\r\n {this.props.resources.orderScheduleSetOrEditText}\r\n \r\n
\r\n );\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n resources: { saveButtonText }\r\n } = this.props;\r\n const viewProps: IOrderSchedulerViewProps = {\r\n ...this.props,\r\n datePicker: this._renderDatePicker(),\r\n saveButtonProps: {\r\n tag: 'button',\r\n type: 'button',\r\n onClick: this._saveOrderSchedule,\r\n className: classnames('msc-btn', 'eve-order-schedule__button'),\r\n children: saveButtonText\r\n },\r\n fieldLabelProps: {\r\n tag: 'label',\r\n for: this._fieldId,\r\n children: this.props.resources.orderSchedulerLabel,\r\n className: ''\r\n },\r\n orderScheduleWrapperProps: {\r\n tag: 'div',\r\n className: classnames(this.props.config.className, 'eve-order-schedule')\r\n },\r\n staticDisplay: this._renderStaticDisplay(),\r\n shouldDisplayStatic: this.state.displayStatic\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n}\r\n\r\nexport default OrderScheduler;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IOrderSchedulerViewProps } from './order-scheduler';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport default (props: IOrderSchedulerViewProps) => {\r\n const { datePicker, saveButtonProps, fieldLabelProps, orderScheduleWrapperProps, staticDisplay, shouldDisplayStatic } = props;\r\n return (\r\n \r\n {shouldDisplayStatic ? (\r\n staticDisplay\r\n ) : (\r\n \r\n \r\n {datePicker}\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\n// TODO: Current build require at least one tsx file\r\nexport default () =>
;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\n// TODO: Current build require at least one tsx file\r\nexport default () =>
;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { LogLevel } from '@msdyn365-commerce/telemetry-internal';\nimport * as React from 'react';\nimport { isEditorialMode } from '@msdyn365-commerce/core-internal';\nimport { IDefaultPageProps } from './default-page.props.autogenerated';\n\n/**\n *\n * CoreComponent component\n * @extends {React.PureComponent}\n */\nclass DefaultPageContainer extends React.PureComponent> {\n constructor(props: IDefaultPageProps<{}>) {\n super(props);\n }\n\n public render(): JSX.Element {\n const { slots, telemetry, id, typeName } = this.props;\n\n let skipToMainText = this.props.config && this.props.config.skipToMainText;\n telemetry.log(LogLevel.Debug, \"DefaultPageContainer rendering for '{id}/{typeName}'\", { values: [id, typeName] });\n\n if (!skipToMainText) {\n skipToMainText =\n this.props.context.app && this.props.context.app.platform ? this.props.context.app.platform.skipToMainText : '';\n }\n\n const tabIndexSkipToMain = isEditorialMode(this.props.context.actionContext.requestContext) ? -1 : 0;\n\n return (\n \n \n {skipToMainText}\n \n
\n {slots &&\n slots.header &&\n slots.header.map((children: React.ReactNode) => {\n return children;\n })}\n
\n {slots && slots.subheader && (\n
\n {slots.subheader.map((children: React.ReactNode) => {\n return children;\n })}\n
\n )}\n
\n {slots &&\n slots.primary &&\n slots.primary.map((children: React.ReactNode) => {\n return children;\n })}\n
\n {slots && slots.subfooter && (\n
\n {slots.subfooter.map((children: React.ReactNode) => {\n return children;\n })}\n
\n )}\n
\n {slots &&\n slots.footer &&\n slots.footer.map((children: React.ReactNode) => {\n return children;\n })}\n
\n
\n );\n }\n}\n\nexport default DefaultPageContainer;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PlaceholderForContainerPreviewComponent } from '@msdyn365-commerce/core';\n\nexport default PlaceholderForContainerPreviewComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n// TODO: Current build require at least one tsx file\nexport default () =>
;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\n\nimport { IHtmlBlockProps } from './html-block.props.autogenerated';\n\nexport interface IHtmlBlockViewProps extends IHtmlBlockProps<{}> {\n content?: React.ReactNode;\n className?: string;\n}\n\n/**\n *\n * HtmlBlock component\n * @extends {React.PureComponent>}\n */\nclass HtmlBlock extends React.PureComponent> {\n public render(): JSX.Element | null {\n const { content, className } = this.props.config;\n const text = content && (\n \n );\n const htmlBlockViewProps = {\n ...this.props,\n content: text,\n className: classnames('ms-html-block', className)\n };\n return this.props.renderView(htmlBlockViewProps) as React.ReactElement;\n }\n\n public handleTextChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.content = event.target.value);\n}\n\nexport default HtmlBlock;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\nimport { IHtmlBlockViewProps } from './html-block';\n\nconst HtmlBlockView: React.FC = props => (\n
\n {props.content}\n
\n);\n\nexport default HtmlBlockView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ISpacerProps } from './spacer.props.autogenerated';\n\nexport interface ISpacerViewProps extends ISpacerProps<{}> {\n className?: string;\n}\n\n/**\n *\n * SpacerModule component.\n * @extends {React.PureComponent}\n */\nclass Spacer extends React.PureComponent> {\n public render(): JSX.Element | null {\n const { className } = this.props.config;\n const spacerClass = this.props.config.spacerHeight ? `ms-${this.props.config.spacerHeight}` : 'ms-spacer';\n const viewProps = {\n // Context for telemetry and raw data for C1 to do customization\n // Including computed data, state data and methods\n ...this.props,\n className: (className && classnames(spacerClass, className)) || spacerClass\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n}\n\nexport default Spacer;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nimport { ISpacerViewProps } from './spacer';\n\nconst SpacerView: React.FC = props => {\n const child = props.config.divider &&
;\n\n return (\n
\n {child}\n
\n );\n};\n\nexport default SpacerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n// TODO: Current build require at least one tsx file\nexport default () =>
;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n// TODO: Current build require at least one tsx file\nexport default () =>
;\n"],"names":["AllowableFreightStatusType","AllowableFreight","React","constructor","props","super","cartHasSpringPromoCoupons","this","data","cart","result","Coupons","config","springPromoCoupons","ArrayExtensions","hasElements","items","_intersection","map","c","toUpperCase","_c$Code","Code","filter","undefined","getProductCodesForCartLines","async","_result$cart$CartLine","context","actionContext","itemIds","_uniq","CartLines","cl","ItemId","item","productCodes","getProductCodesAsync","callerContext","ProductCodes","setState","updateAllowableFreightv2","cartId","cartLines","actionInput","GetAllowableFreightCalculationInput","freightCalc","getAllowableFreightCalculationAction","checkAllowableFreightLimit","Object","keys","forEach","k","AllowableFreightStatusLine","length","applyGlobalState","freightCalculation","maxAllowableFreight","ThresholdAmountTotal","isUnitCount","IsUnitCount","cartFreight","ThresholdAmountCurrent","parseInt","maxLimit","limitReached","sliderColourClass","AllowableFreightProgressBarClassEnum","Red","errorMessage","resources","freightAllowanceLimitMessage","statusLine","key","f","StatusType","LTL","mustShipLTL","mustShipLTLMessage","Oil","containsOil","containsOilMessage","Oversized","oversizedItem","overSizedItemMessage","state","cartHasSpringPromoCoupon","componentDidMount","_this$props$data$cart","Id","reaction","_this$props$data$cart2","_this$props$data$cart3","render","viewProps","_objectSpread","renderView","requireCouponForPromoBar","promotions","getValueForLabel","value","cultureFormatter","formatCurrency","toString","getProductCodeByItemId","itemId","_props$state$productC","find","pc","ProductCode","getMaxPromoAmount","promotion","Math","max","promoBreakpoints","pr","spendAmount","getAmountForMfr","mfr","_cart$result","total","TotalAmount","reduce","tot","acc","console","log","_cart$result2","_cl$ItemId","startsWith","inclusionCodes","exclusionCodes","productCode","includes","amounts","Array","isArray","className","sliderLabel","Progress","Yellow","Green","min","promo","i","maxPromoAmount","tier","tierIdx","totalForMfr","_tier","getNextTier","headerText","savingText","valueMax","bp","style","marginBottom","label","multi","display","flexGrow","margin","height","borderRadius","backgroundColor","idx","bar","color","replace","ExcludeDaysDay","OrderScheduler","_fieldId","_checkIfDefaultDate","date","getTime","Date","_handleDateChange","newDate","_renderDatePicker","currentDateISO","now","DatePicker","maxDate","_getMaxDate","excludeDates","_getExclusionDates","selected","onChange","id","runningDate","invalidDays","minDate","datesToExclude","exclude","d","day","sunday","push","monday","tuesday","wednesday","thursday","friday","saturday","getDay","setDate","getDate","maxMonths","setMonth","getMonth","_saveOrderSchedule","checkout","assign","checkoutCart","updateCart","newCartObject","RequestedDeliveryDate","then","displayStatic","_renderStaticDisplay","_this$state$date","orderSchedulerLabel","toLocaleDateString","onClick","orderScheduleSetOrEditText","_this$props$data$chec","dateObj","saveButtonText","datePicker","saveButtonProps","tag","type","classnames","children","fieldLabelProps","for","orderScheduleWrapperProps","staticDisplay","shouldDisplayStatic","Node","DefaultPageContainer","slots","telemetry","typeName","skipToMainText","LogLevel","Debug","values","app","platform","tabIndexSkipToMain","isEditorialMode","requestContext","href","tabIndex","header","subheader","primary","subfooter","footer","HtmlBlock","handleTextChange","event","content","target","text","MsDyn365","editProps","onEdit","request","htmlBlockViewProps","renderModuleAttributes","Spacer","spacerClass","spacerHeight","child","divider"],"sourceRoot":""}