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AAOY,OAGtE,OAAOtV,KAAKqC,MAAMwF,WAAWgJ,EACjC,EAYJ,iICjHO,MAAMgG,EAAqFxU,IAC9F,MAAM,MACFqH,EAAK,oCACL2M,EAAmC,sCACnCC,EAAqC,6CACrCC,EAA4C,yCAC5CI,EAAwC,wCACxCD,EAAuC,4CACvCF,EAA2C,kCAC3CjB,EAAiC,iCACjCkB,GACApU,EACJ,OACID,IAAAA,cAAC+J,EAAAA,OAAMC,OAAAC,OAAA,GAAKiK,GACRlU,IAAAA,cAACkK,EAAAA,KAAIF,OAAAC,OAAA,GAAKgK,GAAsC3M,GAChDtH,IAAAA,cAACkK,EAAAA,KAAIF,OAAAC,OAAA,GAAKkK,GAA+CI,GACzDvU,IAAAA,cAACkK,EAAAA,KAAIF,OAAAC,OAAA,GAAKmK,GACNpU,IAAAA,cAACkK,EAAAA,KAAIF,OAAAC,OAAA,GAAKkJ,GACLmB,GACGA,EAAwC5I,KAAI,CAACgJ,EAAqBpC,KAC9D,MAAME,EAAW,sCAAsCF,IACvD,OACItS,IAAAA,cAACkK,EAAAA,KAAIF,OAAAC,OAAA,GAAKoK,EAAgC,CAAE5B,IAAKD,IAC5CkC,EACE,MAKtB,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-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/themes/citta/views/video-player.view.tsx?eef1","webpack://Citta2.0/./src/modules/interactive-feature-collection/interactive-feature-collection.tsx?96a6","webpack://Citta2.0/./src/modules/interactive-feature-collection/interactive-feature-collection.view.tsx?db52"],"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.\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","/*---------------------------------------------------------------------------------------------\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 } from '@msdyn365-commerce-modules/utilities';\r\nimport { IVideoPlayerViewProps } from '@msdyn365-commerce-modules/video-player/src/modules/video-player/video-player';\r\n// import { IPlayerResources } from '@msdyn365-commerce/components/dist/types/videoplayer/components/data/player-resources';\r\nimport { Image } from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport { IVideoPlayerProps } from '../definition-extensions/video-player.ext.props.autogenerated';\r\n\r\ninterface IVideoPlayerState {\r\n isMobile: boolean;\r\n }\r\n\r\n/**\r\n *\r\n * VideoPlayer component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class VideoPlayerView extends React.PureComponent, IVideoPlayerState> {\r\n constructor(props: IVideoPlayerViewProps) {\r\n //@ts-ignore\r\n super(props);\r\n this.state = {isMobile: false};\r\n }\r\n\r\n public componentDidMount(): void {\r\n this._updateIsMobile();\r\n window.addEventListener('resize', this._updateIsMobile);\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window.removeEventListener('resize', this._updateIsMobile);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n return (\r\n \r\n
\r\n {this.state.isMobile ? this._renderMobile() : this._renderDesktop()}\r\n {this._renderVideoPlayerOverlay()}\r\n
\r\n \r\n );\r\n }\r\n\r\n private _renderDesktop = (): React.ReactNode | null => {\r\n const playerResources: any = {\r\n playAriaLabel: this.props.config.playLabel ? this.props.config.playLabel : '',\r\n pauseAriaLabel: this.props.config.pauseLabel ? this.props.config.pauseLabel : '',\r\n muteAriaLabel: this.props.config.muteLabel ? this.props.config.muteLabel : '',\r\n unMuteAriaLabel: this.props.config.unMuteLabel ? this.props.config.unMuteLabel: '',\r\n fullScreenAriaLabel: this.props.config.fullScreenLabel ? this.props.config.fullScreenLabel : '',\r\n exitFullScreenAriaLabel: this.props.config.exitFullScreenLabel ? this.props.config.exitFullScreenLabel : '',\r\n playingAriaLabel: this.props.config.playingLabel ? this.props.config.playingLabel : '',\r\n pausedAriaLabel: this.props.config.pausedLabel ? this.props.config.pausedLabel : '',\r\n ...this.props.resources\r\n };\r\n if (this.props.player) {\r\n return React.cloneElement(this.props.player as React.ReactElement, {playerResources});\r\n }\r\n return null;\r\n };\r\n\r\n private _renderMobile = (): React.ReactNode | null => {\r\n const imageSettingsDefault = {\r\n disableLazyLoad: true,\r\n viewports: {\r\n xs: { q: `q=80&w=770&h=500&m=6`, w: 770, h: 500 }\r\n }\r\n };\r\n const image = this.props.config.mobileImage;\r\n\r\n if (image) {\r\n return (\r\n
\r\n {image && }\r\n
\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private _renderVideoPlayerOverlay = (): React.ReactNode | null => {\r\n const { buttonText, buttonLink, headerText, horizontalPosition } = this.props.config;\r\n if (buttonText || headerText) {\r\n return (\r\n
\r\n { headerText &&
{headerText}
}\r\n { buttonText && {buttonText}\r\n }\r\n
\r\n );\r\n }\r\n return null;\r\n };\r\n\r\n private _updateIsMobile = () => {\r\n this.setState({\r\n isMobile: window.innerWidth < 768\r\n });\r\n }\r\n}\r\n\r\nexport default VideoPlayerView;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n getTelemetryObject,\n IComponentNodeProps,\n IModuleProps,\n INodeProps,\n ISingleSlideCarouselProps,\n ITelemetryContent,\n NodeTag,\n SingleSlideCarousel\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\nimport { IInteractiveFeatureCollectionProps } from './interactive-feature-collection.props.autogenerated';\n\n/**\n * Interactive Feature Collection view props.\n */\nexport interface IInteractiveFeatureCollectionViewProps extends IInteractiveFeatureCollectionProps<{}> {\n title: React.ReactNode;\n interactiveFeatureCollectionHeading: INodeProps;\n interactiveFeatureCollectionContainer: IModuleProps;\n interactiveFeatureCollectionDesktopContainer: INodeProps;\n interactiveFeatureCollectionDesktopItems: React.ReactNode[];\n interactiveFeatureCollectionMobileContainer: INodeProps;\n interactiveFeatureCollectionMobileItems: React.ReactNode[];\n singleSlideCarouselComponentProps: INodeProps;\n singleSlideCarouselItemContainer: INodeProps;\n}\n\n/**\n *\n * InteractiveFeatureCollection component.\n * @extends {React.PureComponent>}\n */\nexport class InteractiveFeatureCollection extends React.PureComponent> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private static _getFeatureItem(item: React.ReactNode, index: number, itemsCounter: number): React.ReactNode {\n const keyIndex = `interactive-feature-mosaic-item__${index}`;\n return (\n \n {React.cloneElement(item as React.ReactElement, { indexItem: index, itemCounter: itemsCounter, isMosaic: true })}\n \n );\n }\n\n public constructor(props: IInteractiveFeatureCollectionProps) {\n super(props);\n }\n\n public render(): JSX.Element | null {\n const { resources } = this.props;\n const { title, className } = this.props.config;\n const interactiveItems = this.props.slots && this.props.slots.interactiveFeatureItems;\n const itemsFeatureCounter = interactiveItems && interactiveItems.length;\n const singleSlideCarouselComponentProps: IComponentNodeProps = {\n tag: SingleSlideCarousel,\n className: this.props.config.className ?? '',\n flipperPrevLabel: resources.flipperPrevious,\n flipperNextLabel: resources.flipperNext,\n parentId: this.props.id,\n telemetryContent: this._telemetryContent,\n vertical: false\n };\n const initItemsFeatureCounter = 0;\n const createHeading = title && (\n \n );\n const viewProps = {\n ...this.props,\n title: createHeading,\n interactiveFeatureCollectionHeading: {\n className: 'ms-interactive-feature-collection__heading'\n },\n interactiveFeatureCollectionContainer: {\n moduleProps: this.props,\n className: classnames('ms-interactive-feature-collection', className)\n },\n interactiveFeatureCollectionDesktopContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-interactive-feature-collection-desktop'\n },\n interactiveFeatureCollectionMobileContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-interactive-feature-collection-mobile'\n },\n singleSlideCarouselComponentProps,\n singleSlideCarouselItemContainer: {\n tag: 'li' as NodeTag,\n className: 'ms-interactive-feature-collection-carousel',\n role: 'listitem'\n },\n interactiveFeatureCollectionMobileItems: this.props.slots.interactiveFeatureItems,\n interactiveFeatureCollectionDesktopItems:\n itemsFeatureCounter > initItemsFeatureCounter &&\n interactiveItems.map((item: React.ReactNode, index: number) =>\n InteractiveFeatureCollection._getFeatureItem(item, index, itemsFeatureCounter)\n )\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * To handle text change.\n * @param event - To handle text change event.\n * @name - HandleTextChange\n * @public\n * @returns - The Text value.\n */\n public handleTextChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.title!.text = event.target.value);\n}\n\nexport default InteractiveFeatureCollection;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { ReactNode } from 'react';\n\nimport { IInteractiveFeatureCollectionViewProps } from './interactive-feature-collection';\n\n/**\n * Feature Collection View.\n * @param props - Feature Collection view props.\n * @returns Feature Collection View.\n */\nexport const interactiveFeatureCollectionView: React.FC = props => {\n const {\n title,\n interactiveFeatureCollectionHeading,\n interactiveFeatureCollectionContainer,\n interactiveFeatureCollectionDesktopContainer,\n interactiveFeatureCollectionDesktopItems,\n interactiveFeatureCollectionMobileItems,\n interactiveFeatureCollectionMobileContainer,\n singleSlideCarouselComponentProps,\n singleSlideCarouselItemContainer\n } = props;\n return (\n \n {title}\n {interactiveFeatureCollectionDesktopItems}\n \n \n {interactiveFeatureCollectionMobileItems &&\n interactiveFeatureCollectionMobileItems.map((tileItem: ReactNode, index: number) => {\n const keyIndex = `interactive-feature-carousel-item__${index}`;\n return (\n \n {tileItem}\n \n );\n })}\n \n \n \n );\n};\n\nexport default interactiveFeatureCollectionView;\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","Market","CittaJournalPosts","moduleClassName","_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","viewProps","JournalsWrapper","loadMore","d","parseInt","newDisplayCount","VideoPlayerView","_renderDesktop","playerResources","playAriaLabel","playLabel","pauseAriaLabel","pauseLabel","muteAriaLabel","muteLabel","unMuteAriaLabel","unMuteLabel","fullScreenAriaLabel","fullScreenLabel","exitFullScreenAriaLabel","exitFullScreenLabel","playingAriaLabel","playingLabel","pausedAriaLabel","pausedLabel","player","_renderMobile","imageSettingsDefault","disableLazyLoad","viewports","xs","q","w","h","image","mobileImage","_image$imageSettings","Image","altText","gridSettings","imageSettings","loadFailureBehavior","_renderVideoPlayerOverlay","buttonText","buttonLink","headerText","isMobile","_updateIsMobile","innerWidth","addEventListener","componentWillUnmount","removeEventListener","renderModuleAttributes","InteractiveFeatureCollection","_telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","handleTextChange","static","item","index","itemsCounter","keyIndex","key","indexItem","itemCounter","isMosaic","_this$props$config$cl","_title$tag","interactiveItems","slots","interactiveFeatureItems","itemsFeatureCounter","singleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","telemetryContent","vertical","createHeading","Msdyn365","editProps","onEdit","requestContext","interactiveFeatureCollectionHeading","interactiveFeatureCollectionContainer","interactiveFeatureCollectionDesktopContainer","interactiveFeatureCollectionMobileContainer","singleSlideCarouselItemContainer","interactiveFeatureCollectionMobileItems","interactiveFeatureCollectionDesktopItems","_getFeatureItem","interactiveFeatureCollectionView","tileItem"],"sourceRoot":""}