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AAAC,OAAA,GACGmJ,EAAsB,CAC1B7L,KAAM8J,EAAKI,KACXgC,QAASpC,EAAKsB,YAAW,aACbtB,EAAKuB,cACjBrO,UAAW6O,EAAuB7O,UAClCgH,OAAQ8F,EAAKwB,iBAAmB,cAAWhT,IAE1CwR,EAAKG,OAGbH,EAAKpI,KACH,KAId,EAIjB","sources":["webpack://Citta2.0/./src/data-actions/geo-location/bing-maps-locations.ts?cfec","webpack://Citta2.0/./src/modules/citta-freight-charges/citta-freight-charges.tsx?aecb","webpack://Citta2.0/./src/modules/citta-freight-charges/citta-freight-charges.view.tsx?0bed","webpack://Citta2.0/./src/modules/citta-gift-card-container/citta-gift-card-container.tsx?f0ea","webpack://Citta2.0/./src/modules/citta-gift-card-container/citta-gift-card-container.view.tsx?a5f5","webpack://Citta2.0/./src/modules/citta-journal-posts/citta-journal-posts.tsx?e969","webpack://Citta2.0/./src/modules/citta-journal-posts/citta-journal-posts.view.tsx?9b29","webpack://Citta2.0/./src/modules/msdyn365-pva-chat-connector/msdyn365-pva-chat-connector.tsx?797a","webpack://Citta2.0/./src/modules/msdyn365-pva-chat-connector/msdyn365-pva-chat-connector.view.tsx?cb2f","webpack://Citta2.0/./src/modules/image-list/image-list.tsx?5602","webpack://Citta2.0/./src/modules/image-list/image-list.view.tsx?2bed"],"sourcesContent":["import { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput } from '@msdyn365-commerce/core';\r\nimport { BingMapsLocationsResult } from '../../models/bing-maps-data';\r\nimport { GeoLocationPostalCode } from '../../models/search-by-lat-lon-data';\r\n\r\n/**\r\n * Input class for the azure maps search fuzzy API\r\n */\r\nexport class BingMapsLocationsInput implements IActionInput {\r\n public latitude: string;\r\n public longitude: string;\r\n public serviceEndpoint: string;\r\n public apiKey?: string;\r\n\r\n constructor(lat: string, lon: string, apiKey: string, endPoint: string) {\r\n this.latitude = lat;\r\n this.longitude = lon;\r\n this.apiKey = apiKey;\r\n this.serviceEndpoint = endPoint;\r\n }\r\n\r\n public getCacheKey = () => `BingMapsLocationAPI-${this.latitude}-${this.longitude}`;\r\n public getCacheObjectType = () => 'BingMapsLocationAPIResponse';\r\n public dataCacheType = (): CacheType => 'none'; // Don't cache this. Its against bing maps TOS\r\n}\r\n\r\n/**\r\n * Calls azure maps search fuzzy API\r\n */\r\nexport async function getLocations(input: BingMapsLocationsInput, ctx: IActionContext): Promise {\r\n if (!input.apiKey) {\r\n ctx.trace(`[BingMapsLocations] No Bing Maps API key provided`);\r\n\r\n return undefined;\r\n }\r\n\r\n const callbackString = `bingMapsSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\r\n\r\n const requestUrl =\r\n `${encodeURI(input.serviceEndpoint)}/${encodeURI(input.latitude)},${encodeURI(input.longitude)}?key=${encodeURI(input.apiKey)}&jsonp=${callbackString}`;\r\n\r\n return new Promise((resolve) => {\r\n const script = document.createElement('script');\r\n script.setAttribute('type', 'text/javascript');\r\n script.setAttribute('src', requestUrl);\r\n\r\n window[callbackString] = (data: BingMapsLocationsResult) => {\r\n delete window[callbackString];\r\n document.body.removeChild(script);\r\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\r\n resolve({\r\n postalCode: data.resourceSets[0].resources[0].address.postalCode\r\n });\r\n }\r\n resolve(undefined);\r\n };\r\n document.body.appendChild(script);\r\n });\r\n}\r\n\r\nexport default createObservableDataAction({\r\n action: >getLocations,\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Button, Heading, IModuleProps, INodeProps, Modal, ModalBody, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport { AttributeValue, IContext } from '@msdyn365-commerce/retail-proxy';\r\nimport classnames from 'classnames';\r\nimport { reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { dXC_GetFreightChargesForPDPAsync } from '../../data-actions/generated/DataActionExtension.g';\r\nimport { IDXC_GetFreightChargesServiceResponse, IDXC_ItemLine } from '../../data-actions/generated/DataServiceEntities.g';\r\nimport geoLocation, { BingMapsLocationsInput } from '../../data-actions/geo-location/bing-maps-locations';\r\nimport { IGetFreightChargesServiceResponse } from '../../models/GetFreightChargesServiceResponse';\r\nimport { ICittaFreightChargesData } from './citta-freight-charges.data';\r\nimport { ICittaFreightChargesProps } from './citta-freight-charges.props.autogenerated';\r\n\r\ninterface IFreightChargeState {\r\n errorMessage: string;\r\n isOpen: boolean;\r\n postalCode?: string;\r\n latitude: string;\r\n longitude: string;\r\n freightResponse?: IGetFreightChargesServiceResponse;\r\n isError: boolean;\r\n}\r\n\r\nexport interface ICittaFreightChargesViewProps extends ICittaFreightChargesProps {\r\n ProductFreightContainer: IModuleProps;\r\n ProductFreightAttribute: INodeProps;\r\n ProductNoFreightAttribute: INodeProps;\r\n ProductFreightAttributeModal: INodeProps;\r\n productFreightAmount: React.ReactNode;\r\n productFreightMessage: React.ReactNode;\r\n productFreightCalculate: React.ReactNode;\r\n productFreightUpdate: React.ReactNode;\r\n productFreightModel: React.ReactNode;\r\n productNoFreight: React.ReactNode;\r\n freightAttribute: boolean;\r\n freightResponseCheck: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * CittaFreightCharges component\r\n * @extends {React.PureComponent>}\r\n */\r\n@observer\r\nclass CittaFreightCharges extends React.PureComponent, IFreightChargeState> {\r\n\r\n public state: IFreightChargeState = {\r\n errorMessage: '',\r\n isOpen: false,\r\n postalCode: '',\r\n latitude: '',\r\n longitude: '',\r\n freightResponse: undefined,\r\n isError: false\r\n };\r\n\r\n private _productFreightAttribute: string = this.props.context.app.config.freightValue && this.props.context.app.config.freightValue.toUpperCase() || 'FREIGHT ITEM';\r\n private _PostalCodeInputRef: React.RefObject;\r\n private _showAvailablityText: boolean = false;\r\n\r\n constructor(props: ICittaFreightChargesProps) {\r\n super(props);\r\n this._PostalCodeInputRef = React.createRef();\r\n this._closeModal = this._closeModal.bind(this);\r\n this._openModal = this._openModal.bind(this);\r\n this._handleSearch = this._handleSearch.bind(this);\r\n this._handleChange = this._handleChange.bind(this);\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n reaction(\r\n () => this.props.config.onUpdateQuantityFreightCheck && this.props.data.productQuantityState.result && this.props.data.productQuantityState.result.productQuantity && this.props.data.productQuantityState.result.productQuantity,\r\n () => {\r\n if (this.props.config.onUpdateQuantityFreightCheck && this.props.data.productQuantityState.result && this.props.data.productQuantityState.result.productQuantity && this.props.data.productQuantityState.result.productQuantity) {\r\n this._getNewFreightCharges(this.state.postalCode).catch(e => {\r\n this.props.telemetry.error(`Something went wrong ------${e}`);\r\n });\r\n }\r\n }\r\n );\r\n\r\n // tslint:disable-next-line: no-this-assignment\r\n const that = this;\r\n const freightAttribute: AttributeValue[] | undefined = this.props.data.productAttributes.result;\r\n if (freightAttribute && this._checkFreightAttributes()) {\r\n if (navigator && navigator.geolocation) {\r\n navigator.geolocation.getCurrentPosition(\r\n async position => {\r\n this.setState({ latitude: position.coords.latitude.toString(), longitude: position.coords.longitude.toString() });\r\n const response: IDXC_GetFreightChargesServiceResponse = await this._getItemFreightCharges();\r\n this.setState({ isOpen: false, freightResponse: response, errorMessage: '' });\r\n },\r\n error => {\r\n if (error.code === error.PERMISSION_DENIED) {\r\n that.setState({ isOpen: false, errorMessage: '' });\r\n }\r\n });\r\n }\r\n } else {\r\n this.setState({ isOpen: false, freightResponse: undefined, errorMessage: '' });\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const config = this.props.config;\r\n const responseObj: IGetFreightChargesServiceResponse | undefined = this.state.freightResponse;\r\n const freightAttributeCheck = this._checkFreightAttributes();\r\n let freightResponseCheck: boolean = false;\r\n if (responseObj && this.state.postalCode && !this.state.isError) {\r\n freightResponseCheck = true;\r\n }\r\n const CittaFreightChargesViewProps = {\r\n ...this.props,\r\n ProductFreightContainer: {\r\n moduleProps: this.props,\r\n className: classnames('product-freight-charges', config.className)\r\n },\r\n ProductFreightAttribute: {\r\n className: 'product-freight'\r\n },\r\n ProductFreightAttributeModal: {\r\n className: ''\r\n },\r\n ProductNoFreightAttribute: {\r\n className: ''\r\n },\r\n productFreightAmount: this._renderProductFreightAmount(),\r\n productFreightMessage: this._renderProductFreightMessage(),\r\n productFreightCalculate: this._renderProductFreightCalculate(),\r\n productFreightUpdate: this._renderProductFreightUpdate(),\r\n productFreightModel: this._renderProductFreightModal(),\r\n productNoFreight: this._renderProductNoFreight(),\r\n freightAttribute: freightAttributeCheck,\r\n freightResponseCheck: freightResponseCheck\r\n };\r\n return this.props.renderView(CittaFreightChargesViewProps) as React.ReactElement;\r\n }\r\n\r\n private _checkFreightAttributes = (): boolean => {\r\n const prodAttributes: AttributeValue[] | undefined = this.props && this.props.data && this.props.data.productAttributes && this.props.data.productAttributes.result;\r\n if (prodAttributes && prodAttributes.length) {\r\n const filterAttributes = prodAttributes.filter(\r\n attribute => attribute.Name && attribute.Name.toUpperCase() === this._productFreightAttribute\r\n );\r\n if (filterAttributes && filterAttributes.length) {\r\n if (!filterAttributes[0].BooleanValue) {\r\n this._showAvailablityText = true;\r\n }\r\n return filterAttributes[0].BooleanValue || false;\r\n } else {\r\n this._showAvailablityText = false;\r\n return false;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n private _handleChange = (ref: React.RefObject) => (event: React.ChangeEvent) => {\r\n this.setState({ errorMessage: '' });\r\n }\r\n\r\n private _handleSearch = async (e: React.MouseEvent | React.KeyboardEvent | React.FormEvent): Promise => {\r\n e.preventDefault();\r\n const postalCodeInput = this._PostalCodeInputRef && this._PostalCodeInputRef.current ? this._PostalCodeInputRef.current.value : '';\r\n if (postalCodeInput.length > 4) {\r\n this.setState({ errorMessage: this.props.config.postalCodeInputErrorMessage1! });\r\n } else if (!this._isValidPostalCode(postalCodeInput)) {\r\n this.setState({ errorMessage: this.props.config.postalCodeInputErrorMessage2! });\r\n } else {\r\n const response: IDXC_GetFreightChargesServiceResponse = await this._getItemFreightCharges(postalCodeInput);\r\n if (response.Result === 'false') {\r\n this.setState({ errorMessage: response.Message!, isError: true });\r\n } else if (response && response.Result) {\r\n this.setState({ errorMessage: '', freightResponse: response, postalCode: postalCodeInput, isError: false });\r\n } else if (response && !response.Result) {\r\n this.setState({ errorMessage: response.Message!, isError: true });\r\n }\r\n }\r\n }\r\n\r\n private _getNewFreightCharges = async (postalCode?: string): Promise => {\r\n const response: IDXC_GetFreightChargesServiceResponse = await this._getItemFreightCharges(postalCode);\r\n if (response.Result === 'false') {\r\n this.setState({ errorMessage: response.Message!, isError: true });\r\n } else if (response && response.Result) {\r\n this.setState({ errorMessage: '', freightResponse: response, isError: false });\r\n } else if (response && !response.Result) {\r\n this.setState({ errorMessage: response.Message!, isError: true });\r\n }\r\n }\r\n\r\n private _getItemFreightCharges(postalCode?: string): Promise {\r\n const itemId = this.props && this.props.data && this.props.data.product && this.props.data.product.result ? this.props.data.product.result.ItemId : '';\r\n const response: IGetFreightChargesServiceResponse = { ChargesAmount: 0 };\r\n const itemLine: IDXC_ItemLine = { ItemId: itemId, Quantity: this.props.data.currentQuantity.result };\r\n const ctx: IContext = { callerContext: this.props.context.actionContext };\r\n\r\n if (!postalCode) {\r\n const bingAppKey = this.props && this.props.config && this.props.config.bingApiAppKey ? this.props.config.bingApiAppKey : '';\r\n const bingApiEndpoint = this.props && this.props.config && this.props.config.bingApiEndPoint || '';\r\n const searchInput: BingMapsLocationsInput = new BingMapsLocationsInput(this.state.latitude, this.state.longitude, bingAppKey, bingApiEndpoint);\r\n geoLocation(searchInput, this.props.context.actionContext).then(\r\n (result) => {\r\n if (result) {\r\n postalCode = result.postalCode;\r\n this.setState({ postalCode: postalCode });\r\n dXC_GetFreightChargesForPDPAsync(ctx, postalCode!, itemLine).then(\r\n (responseObj) => {\r\n if (responseObj) {\r\n if (responseObj.Result === 'false') {\r\n this.setState({ errorMessage: responseObj.Message!, isError: true });\r\n } else {\r\n this.setState({ errorMessage: '', freightResponse: responseObj, isError: false });\r\n }\r\n } else {\r\n this.setState({ isError: true });\r\n }\r\n }\r\n );\r\n } else {\r\n postalCode = '';\r\n return;\r\n }\r\n });\r\n } else {\r\n this.setState({ postalCode: postalCode });\r\n return dXC_GetFreightChargesForPDPAsync(ctx, postalCode, itemLine);\r\n }\r\n return Promise.resolve(response);\r\n }\r\n\r\n private _closeModal(): void {\r\n this.setState(prevState => ({\r\n isOpen: !prevState.isOpen\r\n }));\r\n }\r\n private _openModal(): void {\r\n this.setState(prevState => ({\r\n isOpen: !prevState.isOpen\r\n }));\r\n }\r\n\r\n private _isValidPostalCode = (postalCode: string): boolean => {\r\n const regex = /^[0-9]+[0-9]*$/;\r\n return regex.test(postalCode);\r\n }\r\n\r\n private _getFormattedPrice(freightAmount: number): React.ReactNode {\r\n const formattedPrice = this.props.context.cultureFormatter.formatCurrency(freightAmount);\r\n return (\r\n {formattedPrice}\r\n );\r\n }\r\n\r\n private _renderProductFreightAmount(): React.ReactNode {\r\n const responseObj: IGetFreightChargesServiceResponse | undefined = this.state.freightResponse;\r\n if (responseObj) {\r\n return (\r\n
\r\n {this._getFormattedPrice(responseObj.ChargesAmount)} {this.props.resources.freight_estimatedShippingText}\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private _renderProductFreightMessage(): React.ReactNode {\r\n const responseObj: IGetFreightChargesServiceResponse | undefined = this.state.freightResponse;\r\n const resources = this.props.resources;\r\n const postalCode = this.state.postalCode || '';\r\n const freightBasedOnCityName = responseObj && postalCode ? `${resources.freight_basedOnText}: ${postalCode}` : '';\r\n return (\r\n
{freightBasedOnCityName}
\r\n );\r\n }\r\n\r\n private _renderProductFreightUpdate(): React.ReactNode {\r\n const resources = this.props.resources;\r\n return (\r\n
\r\n \r\n {resources.freight_updateLocationLinkText}\r\n \r\n
\r\n );\r\n }\r\n\r\n private _renderProductFreightCalculate(): React.ReactNode {\r\n const resources = this.props.resources;\r\n return (\r\n
\r\n \r\n {resources.freight_updateLocationLinkAltText}\r\n \r\n
\r\n );\r\n }\r\n private _renderProductNoFreight(): React.ReactNode | null {\r\n const { config, resources } = this.props;\r\n const showAvailablityTextConfig = config.freightCheck ? config.freightCheck : false;\r\n // Show availability based in freight attribute as configured in appsetting and module configuration\r\n if (showAvailablityTextConfig && this._showAvailablityText) {\r\n const availableForLabelText = resources.freight_availableForLabel ? resources.freight_availableForLabel : 'Available for';\r\n const availableForValue = config.availableFor ? config.availableFor : 'Click & Collect';\r\n return (\r\n
\r\n {availableForLabelText}\r\n {availableForValue}\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private _renderProductFreightModal(): React.ReactNode {\r\n const responseObj: IGetFreightChargesServiceResponse | undefined = this.state.freightResponse;\r\n const { config, resources } = this.props;\r\n return (\r\n \r\n {config.modalHeader}\r\n \r\n
\r\n
\r\n \r\n

{config.postalCodeInputLabel}

\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n {this.state.errorMessage ?
\r\n {this.state && this.state.errorMessage ?\r\n \r\n {this.state.errorMessage}\r\n : null\r\n }\r\n
: null}\r\n {responseObj ?\r\n
\r\n
\r\n
\r\n

{resources.freight_postCode}

\r\n

{this.state.postalCode ? this.state.postalCode : ''}

\r\n
\r\n
\r\n

{resources.freight_delivery}

\r\n

{responseObj ? this._getFormattedPrice(responseObj.ChargesAmount) : null}

\r\n
\r\n
\r\n
\r\n

{config.deliveryInfoBottom1}

\r\n

{config.deliveryInfoBottom2}

\r\n

{config.deliveryInfoBottom3}

\r\n
\r\n
: null}\r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n\r\n}\r\n\r\nexport default CittaFreightCharges;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ICittaFreightChargesViewProps } from './citta-freight-charges';\r\n\r\nconst CittaFreightChargesView: React.FC = props => {\r\n const { ProductFreightContainer, productFreightAmount, productFreightMessage, productFreightCalculate, productFreightUpdate,\r\n productFreightModel, productNoFreight, freightAttribute, ProductFreightAttribute, ProductFreightAttributeModal, ProductNoFreightAttribute, freightResponseCheck } = props;\r\n if (freightAttribute) {\r\n return (\r\n \r\n {freightResponseCheck ?\r\n \r\n {productFreightAmount}\r\n {productFreightMessage}\r\n {productFreightUpdate}\r\n :\r\n \r\n {productFreightCalculate}\r\n }\r\n \r\n {productFreightModel}\r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {productNoFreight}\r\n \r\n );\r\n }\r\n};\r\n\r\nexport default CittaFreightChargesView;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { ICittaGiftCardContainerData } from './citta-gift-card-container.data';\r\nimport { ICittaGiftCardContainerProps } from './citta-gift-card-container.props.autogenerated';\r\n\r\nexport interface ICittaGiftCardContainerViewProps extends ICittaGiftCardContainerProps {\r\n GiftCardWrapper: IModuleProps;\r\n giftCardContent: React.ReactNode[];\r\n giftCardForm: React.ReactNode[];\r\n SlotWrapper: INodeProps;\r\n}\r\n\r\n/**\r\n *\r\n * CittaGiftCardContainer component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass CittaGiftCardContainer extends React.PureComponent> {\r\n private moduleClassName: string = 'giftcardCreateWrap';\r\n\r\n public render(): JSX.Element | null {\r\n const viewProps: ICittaGiftCardContainerViewProps = {\r\n ...this.props,\r\n GiftCardWrapper: {\r\n moduleProps: this.props,\r\n className: classnames(this.moduleClassName)\r\n },\r\n giftCardContent: this.props.slots.slot1,\r\n giftCardForm: this.props.slots.slot2,\r\n SlotWrapper: {\r\n className: 'giftcardsslot-wrapper',\r\n },\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n}\r\n\r\nexport default CittaGiftCardContainer;\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\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ICittaGiftCardContainerViewProps } from './citta-gift-card-container';\r\n\r\nexport default (props: ICittaGiftCardContainerViewProps) => {\r\n const { GiftCardWrapper, giftCardContent, giftCardForm, SlotWrapper } = props;\r\n return (\r\n \r\n \r\n {...giftCardContent}\r\n \r\n \r\n {...giftCardForm}\r\n \r\n \r\n );\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\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport * as React from 'react';\r\nimport classnames from 'classnames';\r\n\r\nimport { ICittaJournalPostsData } from './citta-journal-posts.data';\r\nimport { ICittaJournalPostsProps } from './citta-journal-posts.props.autogenerated';\r\nimport {IGetJournalPostData } from '../../data-actions/journal/get-journal-posts';\r\n\r\nenum Market {\r\n NZ = 'NZL',\r\n AU = 'AUS',\r\n US = 'USA'\r\n}\r\n\r\nexport interface ICittaJournalPostsViewProps extends ICittaJournalPostsProps {\r\n JournalsWrapper: IModuleProps;\r\n journals: React.ReactNode;\r\n loadMore: React.ReactNode;\r\n search: React.ReactNode;\r\n categories: React.ReactNode;\r\n}\r\n\r\n// const Categories = {\r\n// behindtheproduct: 'Città Behind the product',\r\n// styling: 'Stying'\r\n// }\r\n\r\nexport interface ICittaJournalPostsState {\r\n allJournals: any;\r\n displayedJournals: any;\r\n displayCount: number;\r\n searchTerm: string;\r\n categoryFilter: string;\r\n}\r\n\r\n/**\r\n *\r\n * CittaJournalPosts component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass CittaJournalPosts extends React.PureComponent, ICittaJournalPostsState> {\r\n private moduleClassName: string = 'journal-posts-wrapper';\r\n\r\n constructor(props: any) {\r\n super(props);\r\n const { audience } = props.config;\r\n const journals = props.data && props.data.journals && props.data.journals.result;\r\n let journalsFilteredByAudience = journals.posts && journals.posts.filter((post: any) => post.audience.indexOf(audience) != -1);\r\n\r\n this.state = {\r\n allJournals: journalsFilteredByAudience || [],\r\n displayedJournals: (journalsFilteredByAudience || []).slice(0, 6),\r\n displayCount: 6,\r\n searchTerm: '',\r\n categoryFilter: ''\r\n }\r\n this._loadMore = this._loadMore.bind(this);\r\n this._renderSearch = this._renderSearch.bind(this);\r\n this._renderCategoryFilter = this._renderCategoryFilter.bind(this);\r\n this._onType = this._onType.bind(this);\r\n this._getPostUrl = this._getPostUrl.bind(this);\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (MsDyn365.isBrowser && typeof window !== 'undefined') {\r\n const { categories } = this.props.config;\r\n const url: string = decodeURI(window.location.search);\r\n const urlParams = new URLSearchParams(url);\r\n const journalcategory = urlParams.has('journalcategory') ? urlParams.get('journalcategory') : '';\r\n const category = categories?.find((c: String) => c.toLocaleLowerCase() === journalcategory?.toLocaleLowerCase());\r\n category && this._setCategoryFilter(category)\r\n }\r\n\r\n let container = document.querySelector(\".journal-posts-wrapper-categories ul\");\r\n if (container) {\r\n const middle = container.querySelector(\"li.active\") || container.children[Math.floor((container.children.length) / 2)];\r\n // @ts-ignore\r\n container.scrollLeft = middle.offsetLeft + middle.offsetWidth / 2 - container.offsetWidth / 2;\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {displayedJournals, allJournals} = this.state;\r\n\r\n if (!allJournals || !allJournals.length) {\r\n //TODO: create a better page in here for no posts found or something\r\n return
No journals found at the moment
\r\n }\r\n\r\n const viewProps: ICittaJournalPostsViewProps = {\r\n ...(this.props as ICittaJournalPostsProps ),\r\n JournalsWrapper: {\r\n moduleProps: this.props,\r\n className: classnames(this.moduleClassName)\r\n },\r\n journals: this._renderPosts(displayedJournals),\r\n loadMore: this._renderLoadMore(),\r\n search: this._renderSearch(),\r\n categories: this._renderCategoryFilter(),\r\n };\r\n\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private _formatDate(date: string): string {\r\n const d = date.split('-');\r\n return `${parseInt(d[2], 10)}.${parseInt(d[1], 10)}.${d[0]}`\r\n }\r\n\r\n private _renderLoadMore = () => {\r\n const {displayedJournals, allJournals } = this.state;\r\n if (displayedJournals.length >= allJournals.length) {\r\n return null;\r\n }\r\n return (\r\n
\r\n Load More\r\n
\r\n )\r\n }\r\n\r\n private _onType = (e: React.ChangeEvent) => {\r\n const { categoryFilter } = this.state;\r\n\r\n const newDisplayCount = 10;\r\n\r\n const list = this._getFilteredJournals(e.target.value.toLowerCase(), categoryFilter)\r\n \r\n this.setState({\r\n displayCount: newDisplayCount,\r\n displayedJournals: list.slice(0, newDisplayCount),\r\n searchTerm: e.target.value,\r\n })\r\n }\r\n\r\n private _getFilteredJournals = (searchTerm: string, categoryFilter: string) => {\r\n const { allJournals } = this.state;\r\n\r\n let list = allJournals.filter((journal: IGetJournalPostData) => {\r\n if (categoryFilter && journal.category !== categoryFilter) {\r\n return null;\r\n }\r\n return journal.title.toLowerCase().indexOf(searchTerm) !== -1 || \r\n journal.subTitle.toLowerCase().indexOf(searchTerm) !== -1 \r\n })\r\n\r\n return list\r\n }\r\n\r\n private _setCategoryFilter = (type: string) => {\r\n const { searchTerm } = this.state;\r\n\r\n const newDisplayCount = 6;\r\n\r\n let list = this._getFilteredJournals(searchTerm, type);\r\n this.setState({\r\n categoryFilter: type,\r\n displayCount: newDisplayCount,\r\n displayedJournals: list.slice(0, newDisplayCount)\r\n })\r\n }\r\n\r\n private _renderCategoryFilter = () => {\r\n const { categories } = this.props.config;\r\n const { categoryFilter } = this.state;\r\n\r\n return (\r\n
\r\n
    \r\n
  • this._setCategoryFilter('')}>All
  • \r\n {categories?.map(category => {\r\n return
  • this._setCategoryFilter(category)}>{category}
  • \r\n })}\r\n
\r\n
\r\n )\r\n }\r\n\r\n private _renderSearch = () => {\r\n return (\r\n
\r\n \r\n
\r\n )\r\n }\r\n\r\n private _loadMore(): void {\r\n const { displayCount, searchTerm, categoryFilter } = this.state;\r\n\r\n const newDisplayCount = displayCount + 3;\r\n let list = this._getFilteredJournals(searchTerm, categoryFilter);\r\n this.setState({\r\n displayCount: newDisplayCount,\r\n displayedJournals: list.slice(0, newDisplayCount)\r\n })\r\n }\r\n\r\n private getMarket = (url: string = ''): string => {\r\n let indexOfCountry = 3;\r\n if (url.indexOf('test.') > 0 || url.indexOf('cittab.') > 0) {\r\n indexOfCountry = 4;\r\n }\r\n let market = (url && url.length > 0) \r\n ? (url.indexOf('//') > -1 \r\n ? ((url.split('/')[indexOfCountry] === undefined || (url.split('/')[indexOfCountry].length > 2 && url.split('/')[indexOfCountry].toLowerCase() !== 'international' && url.split('/')[indexOfCountry].toLowerCase() !== 'us') || url.split('/')[indexOfCountry] === '') \r\n ? Market.NZ \r\n : url.split('/')[indexOfCountry].toUpperCase()) \r\n : Market.NZ) \r\n : '';\r\n\r\n return market;\r\n };\r\n\r\n private _getPostUrl = (postUrl: string) => {\r\n const url = this.props.context.request.url && this.props.context.request.url.requestUrl && this.props.context.request.url.requestUrl.href;\r\n\r\n if (postUrl.indexOf('https://') !== -1) {\r\n return postUrl;\r\n }\r\n\r\n const market = this.getMarket(url);\r\n\r\n if (market === 'AU') {\r\n return `\\/au${postUrl}`\r\n } else if (market.toLowerCase() === 'international' || market.toLowerCase() === 'us') { \r\n return `/${market.toLowerCase()}${postUrl}`\r\n }\r\n \r\n return postUrl;\r\n }\r\n\r\n private _renderPosts = (posts: IGetJournalPostData[]) => {\r\n if (!posts.length) {\r\n return
We can't find any journals to match that
\r\n }\r\n\r\n return posts.map((post: IGetJournalPostData) => {\r\n return (\r\n \r\n );\r\n })\r\n };\r\n}\r\n\r\nexport default CittaJournalPosts;\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\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport * as React from 'react';\r\nimport { ICittaJournalPostsViewProps } from './citta-journal-posts';\r\n\r\nexport default (props: ICittaJournalPostsViewProps) => {\r\n\r\n return (\r\n \r\n {props.categories}\r\n {props.search}\r\n \r\n
\r\n {props.journals}\r\n
\r\n {props.loadMore}\r\n
\r\n );\r\n};\r\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 { isOboRequest } from '@msdyn365-commerce/core-internal';\nimport { IMsdyn365PvaChatConnectorData } from './msdyn365-pva-chat-connector.data';\nimport { IMsdyn365PvaChatConnectorConfig, IMsdyn365PvaChatConnectorProps } from './msdyn365-pva-chat-connector.props.autogenerated';\n\nexport interface IPvaChatConnectorViewProps extends IMsdyn365PvaChatConnectorProps {\n config: IMsdyn365PvaChatConnectorConfig;\n}\n\n/**\n * PvaChatConnector component\n * @extends {React.PureComponent>}\n */\nclass PvaChatConnector extends React.PureComponent> {\n // Loads CDN version of Botframework-Webchat library\n public componentDidMount(): void {\n if (isOboRequest(this.props.context.request)) {\n return;\n }\n\n const url = this.props.config.botFrameworkCDNURL || this.props.context.app.config.pvaChatConnectorBotFrameworkCDNURL;\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.crossOrigin = 'anonymous';\n document.body.appendChild(script);\n }\n\n public render(): JSX.Element | null {\n if (isOboRequest(this.props.context.request)) {\n return null;\n }\n\n return this.props.renderView(this.props);\n }\n}\n\nexport default PvaChatConnector;\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 { Chat, IPvaChatConnectorViewProps } from './index';\n\nexport default (props: IPvaChatConnectorViewProps) => {\n // Only for CDN loading check, won't be needed with npm package of Botframework-WebChat\n const [loaded, setLoaded] = React.useState(false);\n const p = {\n ...props\n };\n\n // Just to verify that CDN Chat Widget js lib is loaded\n // Remove this block if moving to npm package of Botframework-WebChat\n const interval = setInterval(() => {\n const t = typeof window;\n if (t !== 'undefined' && window.WebChat) {\n setLoaded(true);\n clearInterval(interval);\n }\n }, 100);\n\n return
{loaded && }
;\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 { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IImageListConfig, IImageListProps, IImagesData } from './image-list.props.autogenerated';\n\n/**\n * The interface for IImageListViewProps.\n */\nexport interface IImageListViewProps extends IImageListProps {\n imageList: IModuleProps;\n imageListHeading?: React.ReactNode;\n imageListContainer: INodeProps;\n imageListItem: INodeProps;\n imageListItemAnchorTag: INodeProps;\n imageListItems: IImageListItem[] | undefined;\n}\n\n/**\n * The interface for IImageListItem.\n */\nexport interface IImageListItem {\n image: JSX.Element | undefined;\n text: JSX.Element | undefined;\n link: string | undefined;\n linkAltText: string | undefined;\n linkAriaLabel: string | undefined;\n linkOpenInNewTab?: boolean;\n}\n\n/**\n *\n * ImageList component.\n * @extends {React.PureComponent>}\n */\nclass ImageList extends React.PureComponent> {\n public render(): JSX.Element | null {\n const { heading } = this.props.config;\n const imageListTitle = heading && ;\n const viewProps: IImageListViewProps = {\n ...this.props,\n imageList: {\n moduleProps: this.props,\n className: classnames('ms-image-list', this.props.config.className),\n tag: 'div'\n },\n imageListHeading: imageListTitle,\n imageListContainer: {\n className: 'ms-image-list__list',\n role: 'list',\n tag: 'ul'\n },\n imageListItem: {\n className: 'ms-image-list__list-item',\n role: 'listitem',\n tag: 'li'\n },\n imageListItemAnchorTag: {\n tag: 'a',\n className: 'ms-image-list__link',\n role: 'link'\n },\n imageListItems: this._renderImageListItems()\n };\n return this.props.renderView(viewProps);\n }\n\n /**\n * Handle paragraph change.\n * @param index - Index of image item in array of image items.\n * @returns Void.\n */\n public handleParagraphChange = (index: number) => (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.images![index]) {\n this.props.config.images![index].paragraph = event.target.value;\n }\n };\n\n /**\n * Render list of images.\n * @returns List of images with text and redirection link.\n */\n private readonly _renderImageListItems = (): IImageListItem[] | undefined => {\n const imageList: IImagesData[] | undefined = this.props.config.images;\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 },\n lg: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 },\n xl: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 }\n },\n lazyload: false,\n disableLazyLoad: true\n };\n return imageList?.map((item, index) => {\n const { image, link, paragraph } = item;\n\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings!,\n imageSettings: (image?.imageSettings ?? defaultImageSettings) as Msdyn365.IImageSettings | undefined\n };\n\n const imageLink: string | undefined = link?.linkUrl.destinationUrl;\n const imageLinkText: string | undefined = link?.linkText ?? link?.ariaLabel;\n const imageLinkAriaLabel: string | undefined = link?.ariaLabel;\n const imageLinkOpenInNewTab = link?.openInNewTab;\n\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\n const imageImage = (\n \n );\n\n const imageText = paragraph && (\n \n );\n const imageListItem: IImageListItem = {\n image: imageImage,\n text: imageText,\n link: imageLink,\n linkAltText: imageLinkText,\n linkAriaLabel: imageLinkAriaLabel,\n linkOpenInNewTab: imageLinkOpenInNewTab\n };\n return imageListItem;\n });\n };\n}\n\nexport default ImageList;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IImageListViewProps } from './image-list';\n\n/**\n * Render the thumbnail item images.\n * @param props - The image list view props.\n * @returns Return HTML having IImageListViewProps props with image List.\n */\nexport const imageListView = (props: IImageListViewProps): JSX.Element => {\n const { imageList, imageListContainer, imageListHeading, imageListItem, imageListItems, imageListItemAnchorTag } = props;\n return (\n \n {imageListHeading}\n \n {imageListItems?.map(item => {\n let indexKey: string;\n\n if (item.image) {\n const image = (item.image as unknown) as Msdyn365.Image;\n indexKey = image.props.src as string;\n } else {\n const text = (item.text as unknown) as Msdyn365.RichTextComponent;\n indexKey = text.props.text as string;\n }\n return (\n \n {item.image && (\n \n {item.image}\n \n )}\n {item.text}\n \n );\n })}\n \n \n );\n};\n\nexport default imageListView;\n"],"names":["BingMapsLocationsInput","constructor","lat","lon","apiKey","endPoint","getCacheKey","this","latitude","longitude","getCacheObjectType","dataCacheType","serviceEndpoint","createObservableDataAction","action","async","input","ctx","trace","callbackString","crypto","getRandomValues","Uint32Array","requestUrl","encodeURI","Promise","resolve","script","document","createElement","setAttribute","window","data","body","removeChild","resourceSets","length","resources","postalCode","address","undefined","appendChild","CittaFreightCharges","React","props","super","state","errorMessage","isOpen","freightResponse","isError","_productFreightAttribute","context","app","config","freightValue","toUpperCase","_showAvailablityText","_checkFreightAttributes","prodAttributes","productAttributes","result","filterAttributes","filter","attribute","Name","BooleanValue","_handleChange","ref","event","setState","_handleSearch","e","preventDefault","postalCodeInput","_PostalCodeInputRef","current","value","postalCodeInputErrorMessage1","_isValidPostalCode","response","_getItemFreightCharges","Result","Message","postalCodeInputErrorMessage2","_getNewFreightCharges","test","_closeModal","bind","_openModal","reaction","onUpdateQuantityFreightCheck","productQuantityState","productQuantity","catch","telemetry","error","that","navigator","geolocation","getCurrentPosition","position","coords","toString","code","PERMISSION_DENIED","render","responseObj","freightAttributeCheck","freightResponseCheck","CittaFreightChargesViewProps","_objectSpread","ProductFreightContainer","moduleProps","className","classnames","ProductFreightAttribute","ProductFreightAttributeModal","ProductNoFreightAttribute","productFreightAmount","_renderProductFreightAmount","productFreightMessage","_renderProductFreightMessage","productFreightCalculate","_renderProductFreightCalculate","productFreightUpdate","_renderProductFreightUpdate","productFreightModel","_renderProductFreightModal","productNoFreight","_renderProductNoFreight","freightAttribute","renderView","itemLine","ItemId","product","Quantity","currentQuantity","callerContext","actionContext","dXC_GetFreightChargesForPDPAsync","bingAppKey","bingApiAppKey","bingApiEndpoint","bingApiEndPoint","searchInput","geoLocation","then","ChargesAmount","prevState","_getFormattedPrice","freightAmount","formattedPrice","cultureFormatter","formatCurrency","freight_estimatedShippingText","freightBasedOnCityName","freight_basedOnText","Button","id","freight_updateLocationLinkText","title","href","onClick","outline","freight_updateLocationLinkAltText","freightCheck","availableForLabelText","freight_availableForLabel","availableForValue","availableFor","Modal","autoFocus","fade","horizontalPosition","verticalPosition","zIndex","toggle","applicationNode","lightboxClassName","ModalHeader","modalHeader","ModalBody","name","role","autoComplete","onSubmit","Heading","text","formHeadingText","tag","postalCodeInputLabel","type","onChange","color","freight_postCode","freight_delivery","deliveryInfoBottom1","deliveryInfoBottom2","deliveryInfoBottom3","__decorate","observer","Module","Object","assign","Node","CittaGiftCardContainer","moduleClassName","viewProps","GiftCardWrapper","giftCardContent","slots","slot1","giftCardForm","slot2","SlotWrapper","Market","CittaJournalPosts","_renderLoadMore","displayedJournals","allJournals","_loadMore","_onType","categoryFilter","list","_getFilteredJournals","target","toLowerCase","displayCount","slice","searchTerm","journal","category","indexOf","subTitle","_setCategoryFilter","_renderCategoryFilter","categories","map","_renderSearch","placeholder","getMarket","url","arguments","indexOfCountry","market","split","NZ","_getPostUrl","postUrl","request","_renderPosts","posts","post","imageUrl","src","alt","_formatDate","date","audience","journals","journalsFilteredByAudience","componentDidMount","MsDyn365","isBrowser","decodeURI","location","search","urlParams","URLSearchParams","journalcategory","has","get","find","c","toLocaleLowerCase","container","querySelector","middle","children","Math","floor","scrollLeft","offsetLeft","offsetWidth","JournalsWrapper","loadMore","d","parseInt","newDisplayCount","PvaChatConnector","isOboRequest","botFrameworkCDNURL","pvaChatConnectorBotFrameworkCDNURL","crossOrigin","loaded","setLoaded","p","interval","setInterval","WebChat","clearInterval","Chat","ImageList","handleParagraphChange","index","images","paragraph","_renderImageListItems","imageList","defaultImageSettings","viewports","xs","q","w","h","lg","xl","lazyload","disableLazyLoad","item","_image$imageSettings","_link$linkText","image","link","imageProps","gridSettings","imageSettings","imageLink","linkUrl","destinationUrl","imageLinkText","linkText","ariaLabel","imageLinkAriaLabel","imageLinkOpenInNewTab","openInNewTab","Msdyn365","loadFailureBehavior","requestContext","editProps","onEdit","linkAltText","linkAriaLabel","linkOpenInNewTab","_heading$tag","heading","imageListTitle","imageListHeading","imageListContainer","imageListItem","imageListItemAnchorTag","imageListItems","imageListView","indexKey","key","altText"],"sourceRoot":""}