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R,GAASA,EAAMK,IAAIC,IAGlDA,EAAkBG,IACpB,MAAM,iBAAEC,EAAgB,iBAAEC,GAAqBF,EAE/C,OAAOR,EAAAA,cAACC,EAAAA,KAAIC,OAAAC,OAAA,GAAKM,GAAmBC,IAGxC,EAtCqEC,IACjE,MAAM,QACFC,EAAO,2BACPC,EAA0B,SAC1BC,EAAQ,kCACRC,EAAiC,mBACjCC,EAAkB,WAClBC,EAAU,aACVwT,GACA9T,EAEJ,OAAIG,EAEId,EAAAA,cAAC6C,EAAAA,OAAM3C,OAAAC,OAAA,GAAKU,GACPD,EACA6T,EACAxT,EAAapB,EAAgBkB,EAAmCD,GAAYR,EAAYU,EAAoBF,KAIzHH,EAAMO,QAAQ4B,UAAUC,MAAM,4DACvB,cC/BX4R,EAAOC,QAAU5U,cCAjB2U,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/themes/moekwrsitetheme/views/product-collection.view.tsx?6f64","webpack://Msdyn365.Commerce.Online/./src/themes/moenzcsitetheme/views/product-collection.view.tsx?b8ad","webpack://Msdyn365.Commerce.Online/./src/themes/moeochsitetheme/views/product-collection.view.tsx?6576","webpack://Msdyn365.Commerce.Online/./src/themes/moetwksitetheme/views/product-collection.view.tsx?2c04","webpack://Msdyn365.Commerce.Online/./src/utilities/constants.ts?f70a","webpack://Msdyn365.Commerce.Online/./src/utilities/language-change.ts?a435","webpack://Msdyn365.Commerce.Online/./lib/product-collection/module-registration.js?36d3","webpack://Msdyn365.Commerce.Online/./src/modules/product-collection/product-collection.tsx?4008","webpack://Msdyn365.Commerce.Online/./src/modules/product-collection/product-collection.view.tsx?5d36","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*--------------------------------------------------------------\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 { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IProductCollectionViewProps,\r\n IProductComponentViewProps\r\n} from '@msdyn365-commerce-modules/product-collection/src/modules/product-collection/./product-collection';\r\nimport { getToggleLang, getUserPreferredLanguage, getUserPrefLang } from '../../../utilities/language-change';\r\nimport { KWR, HOME_PAGE, MAORI_LANG } from '../../../utilities/constants';\r\nimport { IProductCollectionProps } from '../definition-extensions/product-collection.ext.props.autogenerated';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nconst ProductCollectionView: React.FC> = props => {\r\n const {\r\n heading,\r\n ProductCollectionContainer,\r\n products,\r\n SingleSlideCarouselComponentProps,\r\n GridComponentProps,\r\n isCarousel,\r\n context\r\n } = props;\r\n const { headingInMaori } = props.config;\r\n\r\n // Identifying Language\r\n const toggleLang = getToggleLang(context);\r\n const userPrefLang = getUserPrefLang(context.request.user.customerAccountNumber as any, context);\r\n const preferredLanguage: any = getUserPreferredLanguage(KWR, HOME_PAGE, userPrefLang, toggleLang, context);\r\n\r\n const handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (props.config.heading!.text = event.target.value);\r\n let headingInMaoriLang = headingInMaori && (\r\n \r\n );\r\n let titleHeading: any = preferredLanguage === MAORI_LANG ? headingInMaoriLang : heading;\r\n if (!headingInMaoriLang) {\r\n titleHeading = heading;\r\n }\r\n\r\n if (products) {\r\n return (\r\n \r\n {titleHeading}\r\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\r\n \r\n );\r\n }\r\n props.context.telemetry.error('Product collection content is empty, module wont render.');\r\n return null;\r\n};\r\n\r\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\r\n const { ProductContainer, productComponent } = product;\r\n\r\n return {productComponent};\r\n};\r\n\r\nexport default ProductCollectionView;\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 { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IProductCollectionViewProps,\r\n IProductComponentViewProps\r\n} from '@msdyn365-commerce-modules/product-collection/src/modules/product-collection/./product-collection';\r\nimport { HOME_PAGE, MAORI_LANG, NZC } from '../../../utilities/constants';\r\nimport { getToggleLang, getUserPrefLang, getUserPreferredLanguage } from '../../../utilities/language-change';\r\nimport { IProductCollectionProps } from '../definition-extensions/product-collection.ext.props.autogenerated';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nconst ProductCollectionView: React.FC> = props => {\r\n const {\r\n heading,\r\n ProductCollectionContainer,\r\n products,\r\n SingleSlideCarouselComponentProps,\r\n GridComponentProps,\r\n isCarousel,\r\n context\r\n } = props;\r\n const { headingInMaori } = props.config;\r\n\r\n // Identifying Language\r\n const toggleLang = getToggleLang(context);\r\n const userPrefLang = getUserPrefLang(context.request.user.customerAccountNumber as any, context);\r\n const preferredLanguage: any = getUserPreferredLanguage(NZC, HOME_PAGE, userPrefLang, toggleLang, context);\r\n\r\n const handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (props.config.heading!.text = event.target.value);\r\n let headingInMaoriLang = headingInMaori && (\r\n \r\n );\r\n let titleHeading: any = preferredLanguage === MAORI_LANG ? headingInMaoriLang : heading;\r\n if (!headingInMaoriLang) {\r\n titleHeading = heading;\r\n }\r\n\r\n if (products) {\r\n return (\r\n \r\n {titleHeading}\r\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\r\n \r\n );\r\n }\r\n props.context.telemetry.error('Product collection content is empty, module wont render.');\r\n return null;\r\n};\r\n\r\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\r\n const { ProductContainer, productComponent } = product;\r\n\r\n return {productComponent};\r\n};\r\n\r\nexport default ProductCollectionView;\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 { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IProductCollectionViewProps,\r\n IProductComponentViewProps\r\n} from '@msdyn365-commerce-modules/product-collection/src/modules/product-collection/./product-collection';\r\nimport { getToggleLang, getUserPreferredLanguage, getUserPrefLang } from '../../../utilities/language-change';\r\nimport { HOME_PAGE, KWR, MAORI_LANG } from '../../../utilities/constants';\r\nimport { IProductCollectionProps } from '../definition-extensions/product-collection.ext.props.autogenerated';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nconst ProductCollectionView: React.FC> = props => {\r\n const {\r\n heading,\r\n ProductCollectionContainer,\r\n products,\r\n SingleSlideCarouselComponentProps,\r\n GridComponentProps,\r\n isCarousel,\r\n context\r\n } = props;\r\n const { headingInMaori } = props.config;\r\n\r\n // Identifying Language\r\n const toggleLang = getToggleLang(context);\r\n const userPrefLang = getUserPrefLang(context.request.user.customerAccountNumber as any, context);\r\n const preferredLanguage: any = getUserPreferredLanguage(KWR, HOME_PAGE, userPrefLang, toggleLang, context);\r\n\r\n const handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (props.config.heading!.text = event.target.value);\r\n let headingInMaoriLang = headingInMaori && (\r\n \r\n );\r\n let titleHeading: any = preferredLanguage === MAORI_LANG ? headingInMaoriLang : heading;\r\n if (!headingInMaoriLang) {\r\n titleHeading = heading;\r\n }\r\n\r\n if (products) {\r\n return (\r\n \r\n {titleHeading}\r\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\r\n \r\n );\r\n }\r\n props.context.telemetry.error('Product collection content is empty, module wont render.');\r\n return null;\r\n};\r\n\r\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\r\n const { ProductContainer, productComponent } = product;\r\n\r\n return {productComponent};\r\n};\r\n\r\nexport default ProductCollectionView;\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 { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IProductCollectionViewProps,\r\n IProductComponentViewProps\r\n} from '@msdyn365-commerce-modules/product-collection/src/modules/product-collection/./product-collection';\r\nimport { getToggleLang, getUserPreferredLanguage, getUserPrefLang } from '../../../utilities/language-change';\r\nimport { HOME_PAGE, MAORI_LANG } from '../../../utilities/constants';\r\nimport { IProductCollectionProps } from '../definition-extensions/product-collection.ext.props.autogenerated';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nconst ProductCollectionView: React.FC> = props => {\r\n const {\r\n heading,\r\n ProductCollectionContainer,\r\n products,\r\n SingleSlideCarouselComponentProps,\r\n GridComponentProps,\r\n isCarousel,\r\n context\r\n } = props;\r\n const { headingInMaori, siteName } = props.config;\r\n\r\n // Identifying Language\r\n const toggleLang = getToggleLang(context);\r\n const userPrefLang = getUserPrefLang(context.request.user.customerAccountNumber as any, context);\r\n const preferredLanguage: any = getUserPreferredLanguage(siteName, HOME_PAGE, userPrefLang, toggleLang, context);\r\n\r\n const handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (props.config.heading!.text = event.target.value);\r\n let headingInMaoriLang = headingInMaori && (\r\n \r\n );\r\n let titleHeading: any = preferredLanguage === MAORI_LANG ? headingInMaoriLang : heading;\r\n if (!headingInMaoriLang) {\r\n titleHeading = heading;\r\n }\r\n\r\n if (products) {\r\n return (\r\n \r\n {titleHeading}\r\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\r\n \r\n );\r\n }\r\n props.context.telemetry.error('Product collection content is empty, module wont render.');\r\n return null;\r\n};\r\n\r\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\r\n const { ProductContainer, productComponent } = product;\r\n\r\n return {productComponent};\r\n};\r\n\r\nexport default ProductCollectionView;\r\n","import { IMoeAddtocollectionResources } from '../modules/moe-addtocollection/moe-addtocollection.props.autogenerated';\r\n\r\n// Language values\r\nexport const ENGLISH_LANG = 'english';\r\nexport const MAORI_LANG = 'maori';\r\nexport const ENGLISH_LANG_CODE = 'en-au';\r\nexport const MAORI_LANG_CODE = 'en-nz';\r\nexport const ENGLISH_OTHER_LANG_CODE = 'en-nz';\r\nexport const CUST_MAORI_LANG_CODE = 'mi-nz';\r\nexport const AXE_MAORI_LANG_CODE = 'mi-nz'; // Language code used for Maori for assistive technologies like screen reader\r\n\r\n// Modules or page values\r\nexport const ERROR_OR_NOTIFICATION = 'ERROR_OR_NOTIFICATION';\r\nexport const HEADER_FOOTER = 'HEADER_FOOTER';\r\nexport const NAVIGATION = 'NAVIGATION';\r\nexport const HOME_PAGE = 'HOME_PAGE';\r\nexport const LANDING_PAGE = 'LANDING_PAGE';\r\nexport const METADATA = 'METADATA';\r\nexport const SOCIAL_SHARE = 'SOCIAL_SHARE';\r\nexport const MY_PROFILE = 'MY_PROFILE';\r\nexport const DOWNLOAD_KETE = 'DOWNLOAD_KETE';\r\nexport const COLLECTIONS = 'COLLECTIONS';\r\nexport const ADD_TO_KETE = 'ADD_TO_KETE';\r\nexport const SEARCH = 'SEARCH';\r\nexport const ACTION_BUTTONS = 'ACTION_BUTTONS';\r\nexport const COLLECTIONS_SITE_LANGUAGE = 'COLLECTIONS_SITE_LANGUAGE';\r\nexport const ADD_TO_KETE_SITE_LANGUAGE = 'ADD_TO_KETE_SITE_LANGUAGE';\r\nexport const DOWNLOAD_KETE_SITE_LANGUAGE = 'DOWNLOAD_KETE_SITE_LANGUAGE';\r\nexport const SEARCH_SITE_LANGUAGE = 'SEARCH_SITE_LANGUAGE';\r\nexport const VIDEO_PLAYER = 'VIDEO_PLAYER';\r\n\r\n// Site Names\r\nexport const OCH = 'och';\r\nexport const TWK = 'twk';\r\nexport const KWR = 'kwr';\r\nexport const KOH = 'koh';\r\nexport const NZC = 'nzc';\r\n\r\n// site toggles\r\nexport const MAORI_TOGGLE_PREFIX = 'mi';\r\nexport const ENGLISH_TOGGLE_PREFIX = '/mi/';\r\n\r\n// Add to collection - resources values\r\nexport const ADD_TO_COLLECTION_RESOURCES: IMoeAddtocollectionResources = {\r\n resourceKey: 'resource value',\r\n flipperNext: 'Next',\r\n flipperPrevious: 'Previous',\r\n unknownError: 'Unexpected error occured. Please try again later.',\r\n unknownErrorInMaori: 'I puta he raru. Me whakamātau anō',\r\n emptyCollection: 'Collection is not available. Please check and try again.',\r\n emptyCollectionInMaori: 'Kāre te kohinga i te wātea. Me taki, ka mahi anō',\r\n emptyCollections: 'no collections are available at this moment',\r\n emptyCollectionsInMaori: 'kāre he kohinga e wātea ana i tēnei wā ',\r\n duplicateName: 'Same collection name already exists. Please try with different name.',\r\n duplicateNameInMaori: 'Kua tau kē tēnei tapanga. Whakamahia he ingoa kē.',\r\n duplicateResource: 'Same resource already exists in the collection.',\r\n duplicateResourceInMaori: 'Kua uru kē tēnā rauemi ki te kohinga',\r\n unAuthenticated: 'User is not authenticated. Please login create collection',\r\n unAuthenticatedInMaori: 'Kāre anō te kaiwhakamahi kia motuhēhēhia. Takiuru mai ki te waihanga kohinga',\r\n noAccountNumber: 'Customer account number missing. Please logout and login again.',\r\n noAccountNumberInMaori: 'Kāre he nama pūkete kiritaki. Me takiputa, ka takiuru mai anō',\r\n networkOffline: 'Internet is offline or it is very slow. Please check your internet connection.',\r\n networkOfflineInMaori: 'Kua weto te ipurangi, he pōturi rānei. Tirohia tō hononga ipurangi.',\r\n exceededCollectionNameLimit: 'Collection name should be less than 25 characters',\r\n exceededCollectionNameLimitInMaori: 'Kia iti iho i te 25 ngā pūāhua o te ingoa o tō kohinga',\r\n noEmptyCollectionSharing: 'Empty collection cannot be shared',\r\n noEmptyCollectionSharingInMaori: 'Kāre e taea te tuari kohinga piako ',\r\n createCOllection: 'Collection has been created successfully.',\r\n createCOllectionInMaori: 'Kua waihangatia he kohinga',\r\n addResource: 'Resource has been added to the collection successfully.',\r\n addResourceInMaori: 'Kua tāpirihia te rauemi ki te kohinga',\r\n updateCollection: 'Collection was updated successfully.',\r\n updateCollectionInMaori: 'Previous',\r\n updateCollectionName: 'Collection name has been updated successfully.',\r\n updateCollectionNameInMaori: 'Kua whakahoutia te ingoa o te kohinga',\r\n deleteCollection: 'Collection was deleted successfully.',\r\n deleteCollectionInMaori: 'Kua mukua te kohinga',\r\n deleteProduct: 'Product was deleted successfully from the collection.',\r\n deleteProductInMaori: 'Kua mukua te hua mai i te kohinga',\r\n notLoggedIn: 'Not logged in yet? Please login to use the collections',\r\n notLoggedInInMaori: 'Kāre anō kia takiuru mai? Me takiuru mai ki te whakamahi i ngā kohinga',\r\n addToCollectionText: 'Add to Collection',\r\n addToCollectionTextInMaori: 'Tāpirihia ki te kohinga',\r\n heyText: 'Hey',\r\n heyTextInMaori: 'Kia ora',\r\n addNewCollection: 'please click on + icon to create new collection',\r\n addNewCollectionInMaori: 'tēnā pāwhiria te atahanga + ki te hanga kohinga hou',\r\n newCollectionText: 'New Collection',\r\n newCollectionTextInMaori: 'He kohinga hou',\r\n createCollectionText: 'Click to create a collection',\r\n createCollectionTextInMaori: 'Pāwhiri ki te waihanga kohinga',\r\n closeText: 'Close',\r\n closeTextInMaori: 'Kati',\r\n selectResourcesHoverText: 'Please select a resource to enable the button',\r\n selectResourcesHoverTextInMaori: 'Tīpakohia koa he rauemi hei whakahohe i te paatene',\r\n createNewCollectionText: 'createNewCollectionText',\r\n createNewCollectionTextInMaori: 'hanga kete hou'\r\n};\r\n\r\n/*\r\n Item: Development environment setup for Language preference\r\n Usage: Can be used to set the language toggle and language preference values while developing and maintaining in future\r\n Caution: Don't change and push this file. Push this file to git only if necessary\r\n Values (DEVELOPMENT_LANGUAGE_TOGGLE, DEVELOPMENT_LANGUAGE_PREFERENCE): should be only 'english' or 'maori'\r\n Values (DEVELOPMENT_SITE_NAME): OCH or TWK or KWR or KOH or NZC\r\n*/\r\nexport const DEVELOPMENT_LANGUAGE_TOGGLE = 'english';\r\nexport const DEVELOPMENT_LANGUAGE_PREFERENCE = 'maori';\r\nexport const DEVELOPMENT_SITE_NAME = NZC;\r\n","/* eslint-disable security/detect-object-injection */\r\nimport {\r\n ENGLISH_LANG,\r\n MAORI_LANG,\r\n MAORI_LANG_CODE,\r\n ERROR_OR_NOTIFICATION,\r\n ADD_TO_KETE,\r\n COLLECTIONS,\r\n DOWNLOAD_KETE,\r\n SEARCH,\r\n HEADER_FOOTER,\r\n NAVIGATION,\r\n HOME_PAGE,\r\n LANDING_PAGE,\r\n OCH,\r\n TWK,\r\n KWR,\r\n KOH,\r\n NZC,\r\n METADATA,\r\n SOCIAL_SHARE,\r\n MY_PROFILE,\r\n ACTION_BUTTONS,\r\n COLLECTIONS_SITE_LANGUAGE,\r\n ADD_TO_KETE_SITE_LANGUAGE,\r\n DOWNLOAD_KETE_SITE_LANGUAGE,\r\n SEARCH_SITE_LANGUAGE,\r\n ENGLISH_OTHER_LANG_CODE,\r\n CUST_MAORI_LANG_CODE,\r\n VIDEO_PLAYER,\r\n DEVELOPMENT_LANGUAGE_TOGGLE,\r\n DEVELOPMENT_LANGUAGE_PREFERENCE,\r\n DEVELOPMENT_SITE_NAME\r\n} from './constants';\r\nimport { readAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CustomersDataActions.g';\r\nimport MsDyn365, { ICoreContext } from '@msdyn365-commerce/core';\r\n\r\n/*\r\n This variable is used to set development mode without localstorage errors\r\n !!!important Please set to false when pushing the code\r\n Use this only for local development\r\n*/\r\nexport const IS_LOCAL_DEVELOPMENT = false;\r\n\r\nexport const getToggleLang = (context: any) => {\r\n console.log('gettogglecontext', context);\r\n if (IS_LOCAL_DEVELOPMENT) {\r\n return DEVELOPMENT_LANGUAGE_TOGGLE;\r\n }\r\n\r\n const siteNameFromCache = getSiteNameFromCache(KWR, context);\r\n if (siteNameFromCache === OCH || siteNameFromCache === KWR) {\r\n return context.request.locale.toLowerCase() === MAORI_LANG_CODE ? MAORI_LANG : ENGLISH_LANG;\r\n } else {\r\n return context.request.locale.toLowerCase() === ENGLISH_OTHER_LANG_CODE ? ENGLISH_LANG : MAORI_LANG;\r\n }\r\n};\r\n\r\nexport const getUserPrefLang = (customerAccountNumber: number, context: any): any => {\r\n console.log('getprefcontext', context);\r\n if (IS_LOCAL_DEVELOPMENT) {\r\n return DEVELOPMENT_LANGUAGE_PREFERENCE;\r\n }\r\n\r\n if (context.request.user.isAuthenticated) {\r\n if (MsDyn365.isBrowser && localStorage !== undefined) {\r\n return localStorage.getItem(`moeUserPrefLang${customerAccountNumber}`);\r\n }\r\n }\r\n\r\n // This piece of code is executed when the user is not logged in\r\n // We will set toggle language as preferred language\r\n const siteNameFromCache = getSiteNameFromCache(KWR, context);\r\n if (siteNameFromCache === OCH || siteNameFromCache === KWR) {\r\n return context.request.locale.toLowerCase() === MAORI_LANG_CODE ? MAORI_LANG : ENGLISH_LANG;\r\n } else {\r\n return context.request.locale.toLowerCase() === ENGLISH_OTHER_LANG_CODE ? ENGLISH_LANG : MAORI_LANG;\r\n }\r\n};\r\n\r\nexport const getUserPreferredLanguage = (\r\n siteName: string,\r\n moduleName: string,\r\n userPrefLang: string,\r\n toggleLang: string,\r\n context: any\r\n): any => {\r\n let siteNameFromCache;\r\n if (IS_LOCAL_DEVELOPMENT) {\r\n siteNameFromCache = DEVELOPMENT_SITE_NAME;\r\n } else {\r\n siteNameFromCache = getSiteNameFromCache(siteName, context);\r\n }\r\n // const siteNameFromCache = siteName;\r\n\r\n // For Online Curriculum Hub site\r\n if (siteNameFromCache === OCH) {\r\n switch (moduleName) {\r\n case ERROR_OR_NOTIFICATION:\r\n return toggleLang;\r\n\r\n case HEADER_FOOTER:\r\n return toggleLang;\r\n\r\n case HOME_PAGE:\r\n return toggleLang;\r\n\r\n case ACTION_BUTTONS:\r\n return toggleLang;\r\n\r\n default:\r\n return ENGLISH_LANG;\r\n }\r\n }\r\n\r\n // For New Zealand Curriculum Online site\r\n if (siteNameFromCache === NZC) {\r\n switch (moduleName) {\r\n case METADATA:\r\n return ENGLISH_LANG;\r\n\r\n case NAVIGATION:\r\n return ENGLISH_LANG;\r\n\r\n case HEADER_FOOTER:\r\n return ENGLISH_LANG;\r\n\r\n case HOME_PAGE:\r\n return ENGLISH_LANG;\r\n\r\n case SOCIAL_SHARE:\r\n return ENGLISH_LANG;\r\n\r\n case ERROR_OR_NOTIFICATION:\r\n return ENGLISH_LANG;\r\n\r\n case MY_PROFILE:\r\n return ENGLISH_LANG;\r\n\r\n case DOWNLOAD_KETE:\r\n return ENGLISH_LANG;\r\n\r\n case DOWNLOAD_KETE_SITE_LANGUAGE:\r\n return ENGLISH_LANG;\r\n\r\n case COLLECTIONS:\r\n return ENGLISH_LANG;\r\n\r\n case ADD_TO_KETE:\r\n return ENGLISH_LANG;\r\n\r\n case ADD_TO_KETE_SITE_LANGUAGE:\r\n return ENGLISH_LANG;\r\n\r\n case SEARCH:\r\n return ENGLISH_LANG;\r\n\r\n case SEARCH_SITE_LANGUAGE:\r\n return ENGLISH_LANG;\r\n\r\n case ACTION_BUTTONS:\r\n return ENGLISH_LANG;\r\n\r\n case COLLECTIONS_SITE_LANGUAGE:\r\n return ENGLISH_LANG;\r\n\r\n case VIDEO_PLAYER:\r\n return ENGLISH_LANG;\r\n\r\n default:\r\n return ENGLISH_LANG;\r\n }\r\n }\r\n\r\n // For Te Whāriki Online site\r\n if (siteNameFromCache === TWK) {\r\n switch (moduleName) {\r\n case METADATA:\r\n return ENGLISH_LANG;\r\n\r\n case NAVIGATION:\r\n return MAORI_LANG;\r\n\r\n case HEADER_FOOTER:\r\n return userPrefLang;\r\n\r\n case HOME_PAGE:\r\n return userPrefLang;\r\n\r\n case LANDING_PAGE:\r\n return userPrefLang;\r\n\r\n case SOCIAL_SHARE:\r\n return userPrefLang;\r\n\r\n case ERROR_OR_NOTIFICATION:\r\n return userPrefLang;\r\n\r\n case MY_PROFILE:\r\n return userPrefLang;\r\n\r\n case DOWNLOAD_KETE:\r\n return MAORI_LANG;\r\n\r\n case DOWNLOAD_KETE_SITE_LANGUAGE:\r\n return userPrefLang;\r\n\r\n case COLLECTIONS:\r\n return MAORI_LANG;\r\n\r\n case COLLECTIONS_SITE_LANGUAGE:\r\n return userPrefLang;\r\n\r\n case ADD_TO_KETE:\r\n return MAORI_LANG;\r\n\r\n case ADD_TO_KETE_SITE_LANGUAGE:\r\n return userPrefLang;\r\n\r\n case SEARCH:\r\n return MAORI_LANG;\r\n\r\n case SEARCH_SITE_LANGUAGE:\r\n return userPrefLang;\r\n\r\n case ACTION_BUTTONS:\r\n return userPrefLang;\r\n\r\n case VIDEO_PLAYER:\r\n return userPrefLang;\r\n\r\n default:\r\n return ENGLISH_LANG;\r\n }\r\n }\r\n\r\n // For Te Kōhanga Reo site\r\n if (siteNameFromCache === KOH) {\r\n switch (moduleName) {\r\n case HOME_PAGE:\r\n return MAORI_LANG;\r\n\r\n case ACTION_BUTTONS:\r\n return MAORI_LANG;\r\n\r\n case VIDEO_PLAYER:\r\n return MAORI_LANG;\r\n\r\n default:\r\n return MAORI_LANG;\r\n }\r\n }\r\n\r\n // For Kauwhata Reo site\r\n if (siteNameFromCache === KWR) {\r\n switch (moduleName) {\r\n case METADATA:\r\n return toggleLang;\r\n\r\n case NAVIGATION:\r\n return toggleLang;\r\n\r\n case HEADER_FOOTER:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case HOME_PAGE:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case SOCIAL_SHARE:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case ERROR_OR_NOTIFICATION:\r\n return toggleLang;\r\n\r\n case MY_PROFILE:\r\n return userPrefLang;\r\n\r\n case DOWNLOAD_KETE:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case DOWNLOAD_KETE_SITE_LANGUAGE:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case COLLECTIONS:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case COLLECTIONS_SITE_LANGUAGE:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case ADD_TO_KETE:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case ADD_TO_KETE_SITE_LANGUAGE:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case SEARCH:\r\n return MAORI_LANG;\r\n\r\n case SEARCH_SITE_LANGUAGE:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case ACTION_BUTTONS:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n case VIDEO_PLAYER:\r\n return userPrefLang === ENGLISH_LANG && toggleLang === ENGLISH_LANG ? ENGLISH_LANG : MAORI_LANG;\r\n\r\n default:\r\n return MAORI_LANG;\r\n }\r\n }\r\n\r\n switch (moduleName) {\r\n case DOWNLOAD_KETE:\r\n return MAORI_LANG;\r\n\r\n case COLLECTIONS:\r\n return MAORI_LANG;\r\n\r\n case ADD_TO_KETE:\r\n return MAORI_LANG;\r\n\r\n case SEARCH:\r\n return MAORI_LANG;\r\n\r\n default:\r\n return toggleLang;\r\n }\r\n};\r\n\r\nexport function setCustomerLangInCache(props: { context: ICoreContext }) {\r\n const { context } = props;\r\n const user = context.request.user;\r\n\r\n if (MsDyn365.isBrowser && !localStorage.getItem(`moeUserPrefLang${user.customerAccountNumber}`)) {\r\n void readAsync({ callerContext: context.actionContext, bypassCache: 'get' }, user.customerAccountNumber as any).then(\r\n customerData => {\r\n const customerLang = customerData.Language;\r\n localStorage.setItem(\r\n `moeUserPrefLang${user.customerAccountNumber}`,\r\n customerLang?.toLowerCase() === CUST_MAORI_LANG_CODE ? MAORI_LANG : ENGLISH_LANG\r\n );\r\n window.location.reload();\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function setTwksiteLangInCache(props: { context: ICoreContext }, siteName: string) {\r\n if (MsDyn365.isBrowser) {\r\n localStorage.setItem(`moeTwkSiteLang`, siteName);\r\n }\r\n}\r\n\r\nexport function getTwksiteLangInCache() {\r\n return MsDyn365.isBrowser ? localStorage.getItem(`moeTwkSiteLang`) : null;\r\n}\r\n\r\nexport function setOnlineChannelInfoInCache(context: ICoreContext, channelInfo: string) {\r\n const hostname = context.request.url?.requestUrl?.hostname;\r\n if (MsDyn365.isBrowser && localStorage !== undefined) {\r\n localStorage.setItem(`moeOnlineChannelInfo${hostname}`, channelInfo);\r\n localStorage.setItem('moeOnlineChannelInfoTimer', JSON.stringify(new Date().getTime()));\r\n }\r\n}\r\n\r\nexport function getOnlineChannelInfoTimer(context: ICoreContext): number {\r\n return MsDyn365.isBrowser ? JSON.parse(localStorage.getItem('moeOnlineChannelInfoTimer') || '0') : '0';\r\n}\r\n\r\nexport function getSiteNameFromCache(siteName: string, context: ICoreContext) {\r\n const hostname = context.request.url?.requestUrl?.hostname;\r\n let onlineChannels: any[] = [];\r\n\r\n if (MsDyn365.isBrowser && localStorage !== undefined) {\r\n onlineChannels = JSON.parse(localStorage.getItem(`moeOnlineChannelInfo${hostname}`) || '[]');\r\n }\r\n\r\n if (onlineChannels?.length > 0) {\r\n const channelIndex = onlineChannels.findIndex((item: any) => item.Id === context.request.apiSettings.channelId);\r\n if (channelIndex > -1) {\r\n if (onlineChannels[channelIndex]?.Name?.includes('ealand')) {\r\n return NZC;\r\n }\r\n\r\n if (onlineChannels[channelIndex]?.Name?.includes('hanga')) {\r\n return KOH;\r\n }\r\n\r\n if (onlineChannels[channelIndex]?.Name?.includes('hildhood')) {\r\n return TWK;\r\n }\r\n\r\n if (onlineChannels[channelIndex]?.Name?.includes('whata')) {\r\n return KWR;\r\n }\r\n\r\n if (onlineChannels[channelIndex]?.Name?.includes('Hub')) {\r\n return OCH;\r\n }\r\n }\r\n } else {\r\n return siteName;\r\n }\r\n\r\n return siteName;\r\n}\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['product-collection'] = {\n c: () => require('@msdyn365-commerce-modules/product-collection/dist/lib/modules/product-collection/product-collection'),\n $type: 'containerModule',\n da: [{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'product-collection',\n p: 'product-collection',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/product-collection/dist/lib/modules/product-collection'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|themes|moekwrsitetheme|views|product-collection'] = {\n c: () => require('partner/themes/moekwrsitetheme/views/product-collection.view.tsx'),\n cn: '__local__-__local__-product-collection'\n };\nviewDictionary['__local__|__local__|themes|moenzcsitetheme|views|product-collection'] = {\n c: () => require('partner/themes/moenzcsitetheme/views/product-collection.view.tsx'),\n cn: '__local__-__local__-product-collection'\n };\nviewDictionary['__local__|__local__|themes|moeochsitetheme|views|product-collection'] = {\n c: () => require('partner/themes/moeochsitetheme/views/product-collection.view.tsx'),\n cn: '__local__-__local__-product-collection'\n };\nviewDictionary['__local__|__local__|themes|moetwksitetheme|views|product-collection'] = {\n c: () => require('partner/themes/moetwksitetheme/views/product-collection.view.tsx'),\n cn: '__local__-__local__-product-collection'\n };\nviewDictionary['@msdyn365-commerce-modules|product-collection|modules|product-collection|product-collection'] = {\n c: () => require('@msdyn365-commerce-modules/product-collection/dist/lib/modules/product-collection/product-collection.view.js'),\n cn: '@msdyn365-commerce-modules-product-collection-product-collection'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport { IPriceComponentResources, ProductComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getCatalogId, ICoreContext } from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n DimensionAvailabilitiesForProductSearchResultInput,\n DimensionTypes,\n DimensionSwatchDisplayTypes,\n getDimensionAvailabilitiesForProductSearchResultAction,\n getPriceForProductSearchResult,\n IDimensionsApp,\n ObjectExtensions,\n PriceForProductSearchResultInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\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 React from 'react';\n\nimport { IProductCollectionData } from './product-collection.data';\nimport { IProductCollectionProps, layout } from './product-collection.props.autogenerated';\n\nexport interface IProductCollectionViewProps extends IProductCollectionProps {\n heading?: React.ReactNode;\n ProductCollectionContainer: IModuleProps;\n SingleSlideCarouselComponentProps: INodeProps;\n GridComponentProps: INodeProps;\n products: IProductComponentViewProps[];\n isCarousel: boolean;\n productPrices?: ProductPrice[];\n seeAllButton?: React.ReactNode;\n}\n\nexport interface IProductComponentViewProps {\n ProductContainer: INodeProps;\n productComponent: React.ReactNode;\n}\nexport interface IProductComponentState {\n products: ProductSearchResult[];\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n}\n\n/**\n * ProductCollection component.\n */\nclass ProductCollection extends React.PureComponent, IProductComponentState> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly productPrices: ProductPrice[];\n\n constructor(props: IProductCollectionProps) {\n super(props);\n this.productPrices = [];\n this.state = {\n products: this.props.config.productCollection.products\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise {\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext.user.isAuthenticated) {\n await this._getActivePrice();\n }\n }\n\n public render(): JSX.Element | null {\n const { heading, className, shouldDisplaySeeAllButton } = this.props.config;\n const { resources } = this.props;\n const recommendation = this.props.config.productCollection.recommendationListId;\n\n // Initialize state in case if the products were not found during initial module render\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Initialize data if not there.\n this.initProductState(this.props.config.productCollection);\n\n const products = this.state.products;\n const isCarousel = this.props.config.layout === layout.carousel;\n const headingLabel = heading ? heading.text : '';\n const headingComponent = heading && (\n \n );\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\n const updatedProducts = products?.map((item: ProductSearchResult, index: number) => {\n const getProductData = this._getProduct(item, index);\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\n });\n\n const productCollectionViewProps = {\n ...this.props,\n heading: headingComponent,\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: '',\n flipperPrevLabel: `${headingLabel} ${resources.flipperPrevious}`,\n flipperNextLabel: `${headingLabel} ${resources.flipperNext}`,\n parentId: this.props.id,\n telemetryContent: this.telemetryContent\n } as IComponentNodeProps,\n ProductCollectionContainer: {\n moduleProps: this.props,\n className: classnames('ms-product-collection', className)\n },\n GridComponentProps: {\n tag: 'ul' as NodeTag,\n className: 'ms-product-collection__items'\n },\n isCarousel,\n\n products:\n ArrayExtensions.hasElements(updatedProducts) &&\n updatedProducts.filter(item => {\n return item !== undefined;\n }),\n productPrices: this.productPrices,\n seeAllButton:\n recommendation && shouldDisplaySeeAllButton && ArrayExtensions.hasElements(updatedProducts)\n ? this._getSeeAllButton(recommendation, headingLabel)\n : undefined\n };\n return this.props.renderView(productCollectionViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n /**\n * Get products dimension availabilities.\n * @param products - Products.\n * @returns Promise.\n */\n private readonly _getProductsDimensionsAvailabilities = async (products: ProductSearchResult[]): Promise => {\n const context = this.props.context as ICoreContext;\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n const validProducts = ArrayExtensions.validValues(products);\n if (\n ArrayExtensions.hasElements(validProducts) &&\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none)\n ) {\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\n new DimensionAvailabilitiesForProductSearchResultInput(\n validProducts,\n this.props.context as ICoreContext,\n DimensionSwatchDisplayTypes.productCard\n ),\n this.props.context.actionContext\n );\n\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\n this.setState({ productsDimensionAvailabilities });\n }\n }\n };\n\n /**\n * Helper method to initialize products state.\n * @param productCollection - List of products.\n */\n private readonly initProductState = async (productCollection: Msdyn365.IProductList) => {\n let products = this.state.products;\n const productCollectionProducts = productCollection.products;\n if (!ArrayExtensions.hasElements(products) && ArrayExtensions.hasElements(productCollectionProducts)) {\n products = productCollectionProducts;\n this.setState({ products });\n } else if (\n ArrayExtensions.hasElements(products) &&\n ArrayExtensions.hasElements(productCollectionProducts) &&\n !ArrayExtensions.equals(products, productCollectionProducts)\n ) {\n products = productCollectionProducts;\n this.setState({ products });\n }\n\n if (Msdyn365.msdyn365Commerce.isBrowser && !ArrayExtensions.hasElements(this.state.productsDimensionAvailabilities)) {\n await this._getProductsDimensionsAvailabilities(products);\n }\n };\n\n private readonly _getProduct = (product: ProductSearchResult, index: number): IProductComponentViewProps | null => {\n if (!product || !product.Name) {\n this.props.telemetry.trace('[product-collection] Product or product name is null');\n return null;\n }\n const telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const { imageSettings, allowBackNavigation } = this.props.config;\n const resources = this.props.resources;\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\n const quickviewSlot =\n this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\n const productComparisonButtonSlot = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\n ? this.props.slots.productComparisonButton[0]\n : null;\n\n const reviewCount = 1;\n const reviewTotalRatings = Number(product.TotalRatings);\n const reviewCountAriaLabelValue =\n reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n return {\n ProductContainer: {\n tag: 'li' as NodeTag,\n className: 'ms-product-collection__item',\n role: 'listitem',\n key: index\n },\n productComponent: (\n \n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === (product.MasterProductId ?? product.RecordId)\n )}\n />\n )\n };\n };\n\n /**\n * Get the active price for products.\n */\n private readonly _getActivePrice = async (): Promise => {\n const productsList = this.state.products;\n const products = await getPriceForProductSearchResult(\n new PriceForProductSearchResultInput(productsList),\n this.props.context.actionContext\n );\n if (Msdyn365.msdyn365Commerce.isBrowser) {\n await this._getProductsDimensionsAvailabilities(products);\n }\n\n this.setState({ products });\n };\n\n /**\n * Get the see all button.\n * @param recommendation - Recommendation.\n * @param headingLabel - Heading label.\n * @returns IProductComponentSeeAllViewProps - Product component see all view props.\n */\n private readonly _getSeeAllButton = (recommendation: string, headingLabel: string): React.ReactNode => {\n const catalogId = getCatalogId(this.props.context.request);\n const seeAllLink = `/search?recommendation=${recommendation}&title=${headingLabel}&catalogid=${catalogId}`;\n return (\n \n {this.props.resources.seeAllButtonText}\n \n );\n };\n}\n\nexport default ProductCollection;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './product-collection';\n\nconst ProductCollectionView: React.FC = props => {\n const {\n heading,\n ProductCollectionContainer,\n products,\n SingleSlideCarouselComponentProps,\n GridComponentProps,\n isCarousel,\n seeAllButton\n } = props;\n\n if (products) {\n return (\n \n {heading}\n {seeAllButton}\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\n \n );\n }\n props.context.telemetry.error('Product collection content is empty, module wont render.');\n return null;\n};\n\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\n const { ProductContainer, productComponent } = product;\n\n return {productComponent};\n};\n\nexport default ProductCollectionView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["_renderCarousel","carouselContainer","items","React","Node","Object","assign","map","_renderProduct","_renderGrid","gridContainer","product","ProductContainer","productComponent","props","heading","ProductCollectionContainer","products","SingleSlideCarouselComponentProps","GridComponentProps","isCarousel","context","headingInMaori","config","toggleLang","getToggleLang","userPrefLang","getUserPrefLang","request","user","customerAccountNumber","preferredLanguage","getUserPreferredLanguage","KWR","HOME_PAGE","headingInMaoriLang","Msdyn365","className","tag","text","editProps","onEdit","event","target","value","requestContext","titleHeading","MAORI_LANG","Module","telemetry","error","NZC","siteName","ENGLISH_LANG","ENGLISH_LANG_CODE","MAORI_LANG_CODE","ENGLISH_OTHER_LANG_CODE","CUST_MAORI_LANG_CODE","AXE_MAORI_LANG_CODE","ERROR_OR_NOTIFICATION","HEADER_FOOTER","NAVIGATION","LANDING_PAGE","METADATA","SOCIAL_SHARE","MY_PROFILE","DOWNLOAD_KETE","COLLECTIONS","ADD_TO_KETE","SEARCH","ACTION_BUTTONS","COLLECTIONS_SITE_LANGUAGE","ADD_TO_KETE_SITE_LANGUAGE","DOWNLOAD_KETE_SITE_LANGUAGE","SEARCH_SITE_LANGUAGE","VIDEO_PLAYER","OCH","TWK","KOH","MAORI_TOGGLE_PREFIX","ENGLISH_TOGGLE_PREFIX","ADD_TO_COLLECTION_RESOURCES","resourceKey","flipperNext","flipperPrevious","unknownError","unknownErrorInMaori","emptyCollection","emptyCollectionInMaori","emptyCollections","emptyCollectionsInMaori","duplicateName","duplicateNameInMaori","duplicateResource","duplicateResourceInMaori","unAuthenticated","unAuthenticatedInMaori","noAccountNumber","noAccountNumberInMaori","networkOffline","networkOfflineInMaori","exceededCollectionNameLimit","exceededCollectionNameLimitInMaori","noEmptyCollectionSharing","noEmptyCollectionSharingInMaori","createCOllection","createCOllectionInMaori","addResource","addResourceInMaori","updateCollection","updateCollectionInMaori","updateCollectionName","updateCollectionNameInMaori","deleteCollection","deleteCollectionInMaori","deleteProduct","deleteProductInMaori","notLoggedIn","notLoggedInInMaori","addToCollectionText","addToCollectionTextInMaori","heyText","heyTextInMaori","addNewCollection","addNewCollectionInMaori","newCollectionText","newCollectionTextInMaori","createCollectionText","createCollectionTextInMaori","closeText","closeTextInMaori","selectResourcesHoverText","selectResourcesHoverTextInMaori","createNewCollectionText","createNewCollectionTextInMaori","DEVELOPMENT_LANGUAGE_TOGGLE","DEVELOPMENT_LANGUAGE_PREFERENCE","DEVELOPMENT_SITE_NAME","IS_LOCAL_DEVELOPMENT","console","log","siteNameFromCache","getSiteNameFromCache","locale","toLowerCase","isAuthenticated","MsDyn365","isBrowser","undefined","localStorage","getItem","moduleName","setCustomerLangInCache","readAsync","callerContext","actionContext","bypassCache","then","customerData","customerLang","Language","setItem","window","location","reload","setOnlineChannelInfoInCache","channelInfo","_context$request$url","hostname","url","requestUrl","JSON","stringify","Date","getTime","getOnlineChannelInfoTimer","parse","_context$request$url2","_onlineChannels","onlineChannels","length","channelIndex","findIndex","item","Id","apiSettings","channelId","_onlineChannels$chann","_onlineChannels$chann2","_onlineChannels$chann3","_onlineChannels$chann4","_onlineChannels$chann5","Name","includes","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","__bindings__","_objectSpread","viewDictionary","cn","ProductCollection","constructor","super","handleHeadingChange","this","_getProductsDimensionsAvailabilities","async","dimensionsToDisplayOnProductCard","app","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","validProducts","ArrayExtensions","validValues","hasElements","DimensionTypes","none","productsDimensionAvailabilities","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","productCard","setState","initProductState","state","productCollectionProducts","productCollection","equals","_getProduct","index","_this$props$data$feat","_this$state$productsD","trace","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","imageSettings","allowBackNavigation","resources","breaCrumbType","breadcrumbType","allowBack","quickviewSlot","slots","quickview","productComparisonButtonSlot","productComparisonButton","reviewCountAriaLabelValue","Number","TotalRatings","ratingCountAriaLabel","ratingCountAriaLabelSingleUser","isPriceMinMaxEnabled","data","featureState","result","find","priceResources","priceRangeSeparator","role","key","ProductComponent","freePriceText","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","typeName","quickViewButton","IsEnabled","dimensionAvailabilities","dimensionAvailability","_product$MasterProduc","masterProductId","MasterProductId","RecordId","_getActivePrice","productsList","getPriceForProductSearchResult","PriceForProductSearchResultInput","_getSeeAllButton","recommendation","headingLabel","seeAllLink","getCatalogId","Button","title","seeAllButtonText","href","productPrices","enableAffiliationBasedPricing","render","shouldDisplaySeeAllButton","recommendationListId","layout","headingComponent","updatedProducts","getProductData","ObjectExtensions","isNullOrUndefined","productCollectionViewProps","SingleSlideCarousel","flipperPrevLabel","flipperNextLabel","parentId","moduleProps","classnames","filter","seeAllButton","renderView","module","exports","ReactDOM"],"sourceRoot":""}